diff mbox series

[2/2] mfd: tps65219: Add gpio cell instance

Message ID 20230224113837.874264-3-jneanne@baylibre.com (mailing list archive)
State New, archived
Headers show
Series Add support for TI TPS65219 PMIC GPIO interface. | expand

Commit Message

jerome Neanne Feb. 24, 2023, 11:38 a.m. UTC
tps65219 PMIC GPIOs are exposed in a standard way:
gpiodetect
gpiochip0 [tps65219-gpio] (3 lines)

Signed-off-by: Jonathan Cormier <jcormier@criticallink.com>
Signed-off-by: Jerome Neanne <jneanne@baylibre.com>
---
 drivers/mfd/tps65219.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Andy Shevchenko Feb. 24, 2023, 12:17 p.m. UTC | #1
Fri, Feb 24, 2023 at 12:38:37PM +0100, Jerome Neanne kirjoitti:
> tps65219 PMIC GPIOs are exposed in a standard way:
> gpiodetect
> gpiochip0 [tps65219-gpio] (3 lines)
> 
> Signed-off-by: Jonathan Cormier <jcormier@criticallink.com>
> Signed-off-by: Jerome Neanne <jneanne@baylibre.com>

Same issues with the commit message as per previous patch.

...

> @@ -267,6 +267,11 @@ static int tps65219_probe(struct i2c_client *client)
>  		return ret;
>  	}
>  
> +	if (ret) {
> +		dev_err(tps->dev, "Failed to add gpio: %d\n", ret);
> +		return ret;
> +	}

Isn't it a dead code?
diff mbox series

Patch

diff --git a/drivers/mfd/tps65219.c b/drivers/mfd/tps65219.c
index c134f3f6e202..5ce62e480ff9 100644
--- a/drivers/mfd/tps65219.c
+++ b/drivers/mfd/tps65219.c
@@ -115,7 +115,7 @@  static const struct mfd_cell tps65219_cells[] = {
 		.resources = tps65219_regulator_resources,
 		.num_resources = ARRAY_SIZE(tps65219_regulator_resources),
 	},
-	{ .name = "tps65219-gpios", },
+	{ .name = "tps65219-gpio", },
 };
 
 static const struct mfd_cell tps65219_pwrbutton_cell = {
@@ -267,6 +267,11 @@  static int tps65219_probe(struct i2c_client *client)
 		return ret;
 	}
 
+	if (ret) {
+		dev_err(tps->dev, "Failed to add gpio: %d\n", ret);
+		return ret;
+	}
+
 	pwr_button = of_property_read_bool(tps->dev->of_node, "ti,power-button");
 	if (pwr_button) {
 		ret = devm_mfd_add_devices(tps->dev, PLATFORM_DEVID_AUTO,