diff options
| author | Stephen Warren <swarren@nvidia.com> | 2012-04-04 17:48:31 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-04-13 06:29:16 -0400 |
| commit | ecb44aec86f0a5e37142a971815f91e065645986 (patch) | |
| tree | ad8ec060152a084a3ca03579451421af77196c4f /include/linux/regmap.h | |
| parent | a42678c4c8b5f6d489829ffc3071fa1f08ee99d1 (diff) | |
regmap: add MMIO bus support
This is a basic memory-mapped-IO bus for regmap. It has the following
features and limitations:
* Registers themselves may be 8, 16, 32, or 64-bit. 64-bit is only
supported on 64-bit platforms.
* Register offsets are limited to precisely 32-bit.
* IO is performed using readl/writel, with no provision for using the
__raw_readl or readl_relaxed variants.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/linux/regmap.h')
| -rw-r--r-- | include/linux/regmap.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index f14588a96eaf..f6abc8d33d64 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h | |||
| @@ -137,6 +137,9 @@ struct regmap *regmap_init_i2c(struct i2c_client *i2c, | |||
| 137 | const struct regmap_config *config); | 137 | const struct regmap_config *config); |
| 138 | struct regmap *regmap_init_spi(struct spi_device *dev, | 138 | struct regmap *regmap_init_spi(struct spi_device *dev, |
| 139 | const struct regmap_config *config); | 139 | const struct regmap_config *config); |
| 140 | struct regmap *regmap_init_mmio(struct device *dev, | ||
| 141 | void __iomem *regs, | ||
| 142 | const struct regmap_config *config); | ||
| 140 | 143 | ||
| 141 | struct regmap *devm_regmap_init(struct device *dev, | 144 | struct regmap *devm_regmap_init(struct device *dev, |
| 142 | const struct regmap_bus *bus, | 145 | const struct regmap_bus *bus, |
| @@ -146,6 +149,9 @@ struct regmap *devm_regmap_init_i2c(struct i2c_client *i2c, | |||
| 146 | const struct regmap_config *config); | 149 | const struct regmap_config *config); |
| 147 | struct regmap *devm_regmap_init_spi(struct spi_device *dev, | 150 | struct regmap *devm_regmap_init_spi(struct spi_device *dev, |
| 148 | const struct regmap_config *config); | 151 | const struct regmap_config *config); |
| 152 | struct regmap *devm_regmap_init_mmio(struct device *dev, | ||
| 153 | void __iomem *regs, | ||
| 154 | const struct regmap_config *config); | ||
| 149 | 155 | ||
| 150 | void regmap_exit(struct regmap *map); | 156 | void regmap_exit(struct regmap *map); |
| 151 | int regmap_reinit_cache(struct regmap *map, | 157 | int regmap_reinit_cache(struct regmap *map, |
