diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-04-04 15:48:31 -0600 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-04-06 10:47:35 +0100 |
commit | 45f5ff8107a845854b1d1812ab1d9c5541f08b4d (patch) | |
tree | d0d532ba060e3f3db9c7e376d90d1fcb34035c04 /include/linux/regmap.h | |
parent | bacdbe077342ecc9e7b3e374cc5a41995116706a (diff) | |
download | op-kernel-dev-45f5ff8107a845854b1d1812ab1d9c5541f08b4d.zip op-kernel-dev-45f5ff8107a845854b1d1812ab1d9c5541f08b4d.tar.gz |
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 f14588a..f6abc8d 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h @@ -137,6 +137,9 @@ struct regmap *regmap_init_i2c(struct i2c_client *i2c, const struct regmap_config *config); struct regmap *regmap_init_spi(struct spi_device *dev, const struct regmap_config *config); +struct regmap *regmap_init_mmio(struct device *dev, + void __iomem *regs, + const struct regmap_config *config); struct regmap *devm_regmap_init(struct device *dev, const struct regmap_bus *bus, @@ -146,6 +149,9 @@ struct regmap *devm_regmap_init_i2c(struct i2c_client *i2c, const struct regmap_config *config); struct regmap *devm_regmap_init_spi(struct spi_device *dev, const struct regmap_config *config); +struct regmap *devm_regmap_init_mmio(struct device *dev, + void __iomem *regs, + const struct regmap_config *config); void regmap_exit(struct regmap *map); int regmap_reinit_cache(struct regmap *map, |