diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-04-05 01:48:29 +0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-04-10 13:31:41 +0400 |
commit | d3c242e1f22f5dfed009296ee45ce896153f0b53 (patch) | |
tree | 074bd0d53a1439e7201639d0acdeeedf5b3f0232 /include/linux/regmap.h | |
parent | dd775ae2549217d3ae09363e3edb305d0fa19928 (diff) | |
download | linux-d3c242e1f22f5dfed009296ee45ce896153f0b53.tar.xz |
regmap: allow regmap instances to be named
Some devices have multiple separate register regions. Logically, one
regmap would be created per region. One issue that prevents this is that
each instance will attempt to create the same debugfs files. Avoid this
by allowing regmaps to be named, and use the name to construct the
debugfs directory name.
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 | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index a90abb6bfa64..0a27ee809ca1 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h @@ -46,6 +46,9 @@ struct reg_default { /** * Configuration for the register map of a device. * + * @name: Optional name of the regmap. Useful when a device has multiple + * register regions. + * * @reg_bits: Number of bits in a register address, mandatory. * @pad_bits: Number of bits of padding between register and value. * @val_bits: Number of bits in a register value, mandatory. @@ -77,6 +80,8 @@ struct reg_default { * @num_reg_defaults_raw: Number of elements in reg_defaults_raw. */ struct regmap_config { + const char *name; + int reg_bits; int pad_bits; int val_bits; |