summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-04-04 15:48:29 -0600
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-13 11:29:19 +0100
commit4b5c0186e48c8d14fd7c38ff99b8d1b9aa475432 (patch)
tree55c80e93f1ae158bed0798ca0354b043639e3bac /include
parent2690dfdb05abf3a8e11ff21ec12dbbe620a026fb (diff)
downloadlinux-4b5c0186e48c8d14fd7c38ff99b8d1b9aa475432.tar.bz2
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')
-rw-r--r--include/linux/regmap.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index f6abc8d33d64..680ddd7de60e 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;