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>
This commit is contained in:

committed by
Mark Brown

parent
dd775ae254
commit
d3c242e1f2
@@ -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;
|
||||
|
Reference in New Issue
Block a user