diff options
author | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | 2015-05-21 18:42:54 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-05-22 13:19:21 +0200 |
commit | a2f776cbb8271d7149784207da0b0c51e8b1847c (patch) | |
tree | 3d9af717987966cda8ff7e2c8e026ad1b3f48aeb /drivers/base | |
parent | regmap: Introduce regmap_get_max_register (diff) | |
download | linux-a2f776cbb8271d7149784207da0b0c51e8b1847c.tar.xz linux-a2f776cbb8271d7149784207da0b0c51e8b1847c.zip |
regmap: Introduce regmap_get_reg_stride
This patch introduces regmap_get_reg_stride() function which would
be used by the infrastructures like nvmem framework built on top of
regmap. Mostly this function would be used for sanity checks on inputs
within such infrastructure.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/regmap/regmap.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index d6c84047b957..e5eef6f1408a 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -2625,6 +2625,18 @@ int regmap_get_max_register(struct regmap *map) } EXPORT_SYMBOL_GPL(regmap_get_max_register); +/** + * regmap_get_reg_stride(): Report the register address stride + * + * Report the register address stride, mainly intended to for use by + * generic infrastructure built on top of regmap. + */ +int regmap_get_reg_stride(struct regmap *map) +{ + return map->reg_stride; +} +EXPORT_SYMBOL_GPL(regmap_get_reg_stride); + int regmap_parse_val(struct regmap *map, const void *buf, unsigned int *val) { |