From db10dacb42ddc6c63464ac8d0b069f8f4cfac00a Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Wed, 4 Apr 2012 15:48:29 -0600 Subject: 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 Signed-off-by: Mark Brown cherry-picked form mainline d3c242e Change-Id: Ia3301fb4d28645f1d3593e547f9409ce20c0acfe Signed-off-by: Laxman Dewangan Reviewed-on: http://git-master/r/96508 Reviewed-by: Simone Willett Tested-by: Simone Willett --- include/linux/regmap.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') 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; -- cgit v1.2.3