[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251102100515.9506-2-jszhang@kernel.org>
Date: Sun,  2 Nov 2025 18:05:14 +0800
From: Jisheng Zhang <jszhang@...nel.org>
To: Linus Walleij <linus.walleij@...aro.org>,
	Bartosz Golaszewski <brgl@...ev.pl>
Cc: linux-gpio@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH 1/2] gpio: fxl6408: Add optional reset gpio control
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@...nel.org>
---
 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
Powered by blists - more mailing lists