mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 10:33:27 +00:00
regmap: Allow ranges to be named
For more useful diagnostics. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
061adc064a
commit
d058bb4961
3 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue