summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-04-04 15:48:29 -0600
committerSimone Willett <swillett@nvidia.com>2012-04-15 14:47:14 -0700
commitdb10dacb42ddc6c63464ac8d0b069f8f4cfac00a (patch)
treeb860eeb429b227284de1c8badf2b0990a2f00601 /include
parent42e1ce3fb12b89554afeb79183c2a6ca64a83eb2 (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> cherry-picked form mainline d3c242e Change-Id: Ia3301fb4d28645f1d3593e547f9409ce20c0acfe Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/96508 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.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 4c52c35b682c..bb732fe260cf 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -43,6 +43,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.
@@ -74,6 +77,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;