summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/base/regmap/internal.h1
-rw-r--r--drivers/base/regmap/regmap.c1
-rw-r--r--include/linux/regmap.h4
3 files changed, 6 insertions, 0 deletions
diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h
index 80f9ab9c3aa..27e66c3e7a5 100644
--- a/drivers/base/regmap/internal.h
+++ b/drivers/base/regmap/internal.h
@@ -120,6 +120,7 @@ int _regmap_write(struct regmap *map, unsigned int reg,
struct regmap_range_node {
struct rb_node node;
+ const char *name;
unsigned int range_min;
unsigned int range_max;
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 0544f63ecd3..ce5129df440 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -579,6 +579,7 @@ struct regmap *regmap_init(struct device *dev,
goto err_range;
}
+ new->name = range_cfg->name;
new->range_min = range_cfg->range_min;
new->range_max = range_cfg->range_max;
new->selector_reg = range_cfg->selector_reg;
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index afc8e1a2cd1..9f228d7f7ac 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -142,6 +142,8 @@ struct regmap_config {
* 1. page selector register update;
* 2. access through data window registers.
*
+ * @name: Descriptive name for diagnostics
+ *
* @range_min: Address of the lowest register address in virtual range.
* @range_max: Address of the highest register in virtual range.
*
@@ -153,6 +155,8 @@ struct regmap_config {
* @window_len: Number of registers in data window.
*/
struct regmap_range_cfg {
+ const char *name;
+
/* Registers of virtual address range */
unsigned int range_min;
unsigned int range_max;