summaryrefslogtreecommitdiff
path: root/drivers/mfd
diff options
context:
space:
mode:
authorMatti Vaittinen <mazziesaccount@gmail.com>2025-04-08 11:46:36 +0300
committerLee Jones <lee@kernel.org>2025-04-24 14:53:06 +0100
commit6a309b489215f705c20cb4ed7f85d9c16f768e55 (patch)
treeb3db9119362be7acaffb12ac6cd47363d3593f05 /drivers/mfd
parent55606b9b20639b634560f44a070ff6153b59b557 (diff)
downloadlinux-next-6a309b489215f705c20cb4ed7f85d9c16f768e55.tar.gz
linux-next-6a309b489215f705c20cb4ed7f85d9c16f768e55.zip
mfd: bd96801: Support ROHM BD96805
The ROHM BD96805 is from the software perspective almost identical to the ROHM BD96801. The main difference is different voltage tuning ranges. Add support differentiating these PMICs based on the compatible, and invoking the regulator driver with correct IC type. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/8680097dc083f191bea56d3ac7c6fe5c005644ec.1744090658.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/rohm-bd96801.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/mfd/rohm-bd96801.c b/drivers/mfd/rohm-bd96801.c
index e5ee5f556a55..dd0be7d675b8 100644
--- a/drivers/mfd/rohm-bd96801.c
+++ b/drivers/mfd/rohm-bd96801.c
@@ -220,6 +220,10 @@ static struct mfd_cell bd96802_cells[] = {
[WDG_CELL] = { .name = "bd96801-wdt", },
[REGULATOR_CELL] = { .name = "bd96802-regulator", },
};
+static struct mfd_cell bd96805_cells[] = {
+ [WDG_CELL] = { .name = "bd96801-wdt", },
+ [REGULATOR_CELL] = { .name = "bd96805-regulator", },
+};
static const struct regmap_range bd96801_volatile_ranges[] = {
/* Status registers */
@@ -599,6 +603,20 @@ static const struct bd968xx bd96802_data = {
.unlock_val = BD96801_UNLOCK,
};
+static const struct bd968xx bd96805_data = {
+ .errb_irqs = bd96801_reg_errb_irqs,
+ .intb_irqs = bd96801_reg_intb_irqs,
+ .num_errb_irqs = ARRAY_SIZE(bd96801_reg_errb_irqs),
+ .num_intb_irqs = ARRAY_SIZE(bd96801_reg_intb_irqs),
+ .errb_irq_chip = &bd96801_irq_chip_errb,
+ .intb_irq_chip = &bd96801_irq_chip_intb,
+ .regmap_config = &bd96801_regmap_config,
+ .cells = bd96805_cells,
+ .num_cells = ARRAY_SIZE(bd96805_cells),
+ .unlock_reg = BD96801_LOCK_REG,
+ .unlock_val = BD96801_UNLOCK,
+};
+
static int bd96801_i2c_probe(struct i2c_client *i2c)
{
struct regmap_irq_chip_data *intb_irq_data, *errb_irq_data;
@@ -621,6 +639,9 @@ static int bd96801_i2c_probe(struct i2c_client *i2c)
case ROHM_CHIP_TYPE_BD96802:
ddata = &bd96802_data;
break;
+ case ROHM_CHIP_TYPE_BD96805:
+ ddata = &bd96805_data;
+ break;
default:
dev_err(&i2c->dev, "Unknown IC\n");
return -EINVAL;
@@ -717,6 +738,7 @@ skip_errb:
static const struct of_device_id bd96801_of_match[] = {
{ .compatible = "rohm,bd96801", .data = (void *)ROHM_CHIP_TYPE_BD96801 },
{ .compatible = "rohm,bd96802", .data = (void *)ROHM_CHIP_TYPE_BD96802 },
+ { .compatible = "rohm,bd96805", .data = (void *)ROHM_CHIP_TYPE_BD96805 },
{ }
};
MODULE_DEVICE_TABLE(of, bd96801_of_match);