diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-04-04 17:48:29 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-04-10 05:31:41 -0400 |
commit | d3c242e1f22f5dfed009296ee45ce896153f0b53 (patch) | |
tree | 074bd0d53a1439e7201639d0acdeeedf5b3f0232 /include/linux/regmap.h | |
parent | dd775ae2549217d3ae09363e3edb305d0fa19928 (diff) |
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 { | |||
46 | /** | 46 | /** |
47 | * Configuration for the register map of a device. | 47 | * Configuration for the register map of a device. |
48 | * | 48 | * |
49 | * @name: Optional name of the regmap. Useful when a device has multiple | ||
50 | * register regions. | ||
51 | * | ||
49 | * @reg_bits: Number of bits in a register address, mandatory. | 52 | * @reg_bits: Number of bits in a register address, mandatory. |
50 | * @pad_bits: Number of bits of padding between register and value. | 53 | * @pad_bits: Number of bits of padding between register and value. |
51 | * @val_bits: Number of bits in a register value, mandatory. | 54 | * @val_bits: Number of bits in a register value, mandatory. |
@@ -77,6 +80,8 @@ struct reg_default { | |||
77 | * @num_reg_defaults_raw: Number of elements in reg_defaults_raw. | 80 | * @num_reg_defaults_raw: Number of elements in reg_defaults_raw. |
78 | */ | 81 | */ |
79 | struct regmap_config { | 82 | struct regmap_config { |
83 | const char *name; | ||
84 | |||
80 | int reg_bits; | 85 | int reg_bits; |
81 | int pad_bits; | 86 | int pad_bits; |
82 | int val_bits; | 87 | int val_bits; |