summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-03-02 23:11:58 +0000
committerMark Brown <broonie@kernel.org>2026-03-02 23:11:58 +0000
commit4d4becffe425fd8a4ab6bea5a8cb6d23428bd657 (patch)
treed2de896fd67aa4bcd71d1b91fbba4d2c5c1f6611 /drivers/regulator
parent4add09ab359c8caa6e65b2200911e1de66565eeb (diff)
parente84141846decb77d2826e553318a608b256804e5 (diff)
regulator: pf9453: Fix IRQ trigger and allow
Merge series from Franz Schnyder <franz.schnyder@toradex.com>: The IRQ_B pin is an open-drain output. The datasheet specifies, that the IRQ_B pin is pulled low when any unmasked interrupt bit status is changed, and it is released high once the application processor reads the INT1 register. As it specifies a level-low behavior, it should not force a falling-edge interrupt. Remove the IRQF_TRIGGER_FALLING to not force the falling-edge interrupt and instead rely on the flag from the device tree. Set the IRQF_SHARED to be able to share the interrupt line with other devices. If the interrupt has not been triggered by the PMIC, return IRQ_NONE.
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/Kconfig2
-rw-r--r--drivers/regulator/bq257xx-regulator.c3
-rw-r--r--drivers/regulator/fp9931.c7
-rw-r--r--drivers/regulator/mt6363-regulator.c4
-rw-r--r--drivers/regulator/pf9453-regulator.c5
-rw-r--r--drivers/regulator/tps65185.c3
6 files changed, 13 insertions, 11 deletions
diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index a708fc63f581..d10b6f9243d5 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -508,7 +508,7 @@ config REGULATOR_FP9931
This driver supports the FP9931/JD9930 voltage regulator chip
which is used to provide power to Electronic Paper Displays
so it is found in E-Book readers.
- If HWWON is enabled, it also provides temperature measurement.
+ If HWMON is enabled, it also provides temperature measurement.
config REGULATOR_LM363X
tristate "TI LM363X voltage regulators"
diff --git a/drivers/regulator/bq257xx-regulator.c b/drivers/regulator/bq257xx-regulator.c
index fc1ccede4468..dab8f1ab4450 100644
--- a/drivers/regulator/bq257xx-regulator.c
+++ b/drivers/regulator/bq257xx-regulator.c
@@ -115,11 +115,10 @@ static void bq257xx_reg_dt_parse_gpio(struct platform_device *pdev)
return;
subchild = of_get_child_by_name(child, pdata->desc.of_match);
+ of_node_put(child);
if (!subchild)
return;
- of_node_put(child);
-
pdata->otg_en_gpio = devm_fwnode_gpiod_get_index(&pdev->dev,
of_fwnode_handle(subchild),
"enable", 0,
diff --git a/drivers/regulator/fp9931.c b/drivers/regulator/fp9931.c
index 7fbcc6327cc6..abea3b69d8a0 100644
--- a/drivers/regulator/fp9931.c
+++ b/drivers/regulator/fp9931.c
@@ -144,13 +144,12 @@ static int fp9931_hwmon_read(struct device *dev, enum hwmon_sensor_types type,
return ret;
ret = regmap_read(data->regmap, FP9931_REG_TMST_VALUE, &val);
- if (ret)
- return ret;
+ if (!ret)
+ *temp = (s8)val * 1000;
pm_runtime_put_autosuspend(data->dev);
- *temp = (s8)val * 1000;
- return 0;
+ return ret;
}
static umode_t fp9931_hwmon_is_visible(const void *data,
diff --git a/drivers/regulator/mt6363-regulator.c b/drivers/regulator/mt6363-regulator.c
index 03af5fa53600..0aebcbda0a19 100644
--- a/drivers/regulator/mt6363-regulator.c
+++ b/drivers/regulator/mt6363-regulator.c
@@ -899,10 +899,8 @@ static int mt6363_regulator_probe(struct platform_device *pdev)
"Failed to map IRQ%d\n", info->hwirq);
ret = devm_add_action_or_reset(dev, mt6363_irq_remove, &info->virq);
- if (ret) {
- irq_dispose_mapping(info->hwirq);
+ if (ret)
return ret;
- }
config.driver_data = info;
INIT_DELAYED_WORK(&info->oc_work, mt6363_oc_irq_enable_work);
diff --git a/drivers/regulator/pf9453-regulator.c b/drivers/regulator/pf9453-regulator.c
index 779a6fdb0574..07cbcd312653 100644
--- a/drivers/regulator/pf9453-regulator.c
+++ b/drivers/regulator/pf9453-regulator.c
@@ -732,6 +732,9 @@ static irqreturn_t pf9453_irq_handler(int irq, void *data)
return IRQ_NONE;
}
+ if (!status)
+ return IRQ_NONE;
+
if (status & IRQ_RSTB)
dev_warn(pf9453->dev, "IRQ_RSTB interrupt.\n");
@@ -809,7 +812,7 @@ static int pf9453_i2c_probe(struct i2c_client *i2c)
}
ret = devm_request_threaded_irq(pf9453->dev, pf9453->irq, NULL, pf9453_irq_handler,
- (IRQF_TRIGGER_FALLING | IRQF_ONESHOT),
+ (IRQF_ONESHOT | IRQF_SHARED),
"pf9453-irq", pf9453);
if (ret)
return dev_err_probe(pf9453->dev, ret, "Failed to request IRQ: %d\n", pf9453->irq);
diff --git a/drivers/regulator/tps65185.c b/drivers/regulator/tps65185.c
index 3286c9ab33d0..786622d8d598 100644
--- a/drivers/regulator/tps65185.c
+++ b/drivers/regulator/tps65185.c
@@ -332,6 +332,9 @@ static int tps65185_probe(struct i2c_client *client)
int i;
data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL);
+ if (!data)
+ return -ENOMEM;
+
data->regmap = devm_regmap_init_i2c(client, &regmap_config);
if (IS_ERR(data->regmap))
return dev_err_probe(&client->dev, PTR_ERR(data->regmap),