Skip to content

Commit f43e6ba

Browse files
committed
Merge tag 'regulator-fix-v6.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator fixes from Mark Brown: "A couple of fairly minor device specific fixes that came in over the past week or so, plus the addition of an actual maintainer for the IR38060" * tag 'regulator-fix-v6.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: tps65219: regulator: tps65219: Fix error codes in probe() regulator: pca9450: Use devm_register_sys_off_handler regulator: dt-bindings: infineon,ir38060: Add Guenter as maintainer from IBM
2 parents f70e1e7 + 11cd7a5 commit f43e6ba

3 files changed

Lines changed: 12 additions & 15 deletions

File tree

Documentation/devicetree/bindings/regulator/infineon,ir38060.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
77
title: Infineon Buck Regulators with PMBUS interfaces
88

99
maintainers:
10-
- Not Me.
10+
- Guenter Roeck <linux@roeck-us.net>
1111

1212
allOf:
1313
- $ref: regulator.yaml#

drivers/regulator/pca9450-regulator.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ struct pca9450 {
4040
struct device *dev;
4141
struct regmap *regmap;
4242
struct gpio_desc *sd_vsel_gpio;
43-
struct notifier_block restart_nb;
4443
enum pca9450_chip_type type;
4544
unsigned int rcnt;
4645
int irq;
@@ -1100,10 +1099,9 @@ static irqreturn_t pca9450_irq_handler(int irq, void *data)
11001099
return IRQ_HANDLED;
11011100
}
11021101

1103-
static int pca9450_i2c_restart_handler(struct notifier_block *nb,
1104-
unsigned long action, void *data)
1102+
static int pca9450_i2c_restart_handler(struct sys_off_data *data)
11051103
{
1106-
struct pca9450 *pca9450 = container_of(nb, struct pca9450, restart_nb);
1104+
struct pca9450 *pca9450 = data->cb_data;
11071105
struct i2c_client *i2c = container_of(pca9450->dev, struct i2c_client, dev);
11081106

11091107
dev_dbg(&i2c->dev, "Restarting device..\n");
@@ -1261,10 +1259,9 @@ static int pca9450_i2c_probe(struct i2c_client *i2c)
12611259
pca9450->sd_vsel_fixed_low =
12621260
of_property_read_bool(ldo5->dev.of_node, "nxp,sd-vsel-fixed-low");
12631261

1264-
pca9450->restart_nb.notifier_call = pca9450_i2c_restart_handler;
1265-
pca9450->restart_nb.priority = PCA9450_RESTART_HANDLER_PRIORITY;
1266-
1267-
if (register_restart_handler(&pca9450->restart_nb))
1262+
if (devm_register_sys_off_handler(&i2c->dev, SYS_OFF_MODE_RESTART,
1263+
PCA9450_RESTART_HANDLER_PRIORITY,
1264+
pca9450_i2c_restart_handler, pca9450))
12681265
dev_warn(&i2c->dev, "Failed to register restart handler\n");
12691266

12701267
dev_info(&i2c->dev, "%s probed.\n",

drivers/regulator/tps65219-regulator.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -454,9 +454,9 @@ static int tps65219_regulator_probe(struct platform_device *pdev)
454454
irq_type->irq_name,
455455
irq_data);
456456
if (error)
457-
return dev_err_probe(tps->dev, PTR_ERR(rdev),
458-
"Failed to request %s IRQ %d: %d\n",
459-
irq_type->irq_name, irq, error);
457+
return dev_err_probe(tps->dev, error,
458+
"Failed to request %s IRQ %d\n",
459+
irq_type->irq_name, irq);
460460
}
461461

462462
for (i = 0; i < pmic->dev_irq_size; ++i) {
@@ -477,9 +477,9 @@ static int tps65219_regulator_probe(struct platform_device *pdev)
477477
irq_type->irq_name,
478478
irq_data);
479479
if (error)
480-
return dev_err_probe(tps->dev, PTR_ERR(rdev),
481-
"Failed to request %s IRQ %d: %d\n",
482-
irq_type->irq_name, irq, error);
480+
return dev_err_probe(tps->dev, error,
481+
"Failed to request %s IRQ %d\n",
482+
irq_type->irq_name, irq);
483483
}
484484

485485
return 0;

0 commit comments

Comments
 (0)