summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorArtur Weber <aweber.kernel@gmail.com>2025-05-15 16:16:33 +0200
committerLee Jones <lee@kernel.org>2025-05-22 10:57:26 +0100
commit75dc12b4450269821fca4c8634f5185d28cf2117 (patch)
tree5cadfa3fda1a71b0e2b0a1117aac73fe6529af56 /include/linux
parent37512643e1f889549e4f9632d6bccef6804cb776 (diff)
regulator: bcm590xx: Store regulator descriptions in table
Instead of filling in the regulator description programatically, store the data in a struct. This will make it a bit nicer to introduce support for other BCM590xx chips besides the BCM59056. To do this, add a new struct type, bcm590xx_reg_data, to store all of the necessary information. Drop the old IS_LDO, IS_GPLDO... macros in favor of the "type" field in this struct. Adapt the old bcm590xx_reg struct to the new types. Signed-off-by: Artur Weber <aweber.kernel@gmail.com> Reviewed-by: Stanislav Jakubek <stano.jakubek@gmail.com> Reviewed-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20250515-bcm59054-v9-6-14ba0ea2ea5b@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mfd/bcm590xx.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/mfd/bcm590xx.h b/include/linux/mfd/bcm590xx.h
index a54c50b2d2c8..09d4ae054242 100644
--- a/include/linux/mfd/bcm590xx.h
+++ b/include/linux/mfd/bcm590xx.h
@@ -27,6 +27,12 @@
#define BCM59056_REV_DIGITAL_B0 2
#define BCM59056_REV_ANALOG_B0 2
+/* regmap types */
+enum bcm590xx_regmap_type {
+ BCM590XX_REGMAP_PRI,
+ BCM590XX_REGMAP_SEC,
+};
+
/* max register address */
#define BCM590XX_MAX_REGISTER_PRI 0xe7
#define BCM590XX_MAX_REGISTER_SEC 0xf0