[PATCH 1/2] gpio: fxl6408: Add optional reset gpio control
From: Jisheng Zhang
Date: Sun Nov 02 2025 - 05:23:21 EST
Add optional active low reset-gpios pin control. If present, de-assert
the specified reset gpio pin to bring the chip out of reset.
Signed-off-by: Jisheng Zhang <jszhang@xxxxxxxxxx>
---
drivers/gpio/gpio-fxl6408.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpio/gpio-fxl6408.c b/drivers/gpio/gpio-fxl6408.c
index 86ebc66b1104..ae520305f7a9 100644
--- a/drivers/gpio/gpio-fxl6408.c
+++ b/drivers/gpio/gpio-fxl6408.c
@@ -104,6 +104,7 @@ static int fxl6408_identify(struct device *dev, struct regmap *regmap)
static int fxl6408_probe(struct i2c_client *client)
{
struct device *dev = &client->dev;
+ struct gpio_desc *reset_gpio;
int ret;
struct gpio_regmap_config gpio_config = {
.parent = dev,
@@ -114,6 +115,10 @@ static int fxl6408_probe(struct i2c_client *client)
.ngpio_per_reg = FXL6408_NGPIO,
};
+ reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
+ if (IS_ERR(reset_gpio))
+ return dev_err_probe(dev, PTR_ERR(reset_gpio), "Failed to get reset gpio\n");
+
gpio_config.regmap = devm_regmap_init_i2c(client, ®map);
if (IS_ERR(gpio_config.regmap))
return dev_err_probe(dev, PTR_ERR(gpio_config.regmap),
--
2.51.0