From: Jisheng Zhang <jszhang@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] gpio: fxl6408: Add optional reset gpio control
Date: Sun, 2 Nov 2025 18:05:14 +0800 [thread overview]
Message-ID: <20251102100515.9506-2-jszhang@kernel.org> (raw)
In-Reply-To: <20251102100515.9506-1-jszhang@kernel.org>
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@kernel.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
next prev parent reply other threads:[~2025-11-02 10:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-02 10:05 [PATCH 0/2] gpio: fxl6408: add optional reset and suspend/resume Jisheng Zhang
2025-11-02 10:05 ` Jisheng Zhang [this message]
2025-11-02 22:25 ` [PATCH 1/2] gpio: fxl6408: Add optional reset gpio control kernel test robot
2025-11-02 22:35 ` kernel test robot
2025-11-02 10:05 ` [PATCH 2/2] gpio: fxl6408: Add suspend/resume support Jisheng Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251102100515.9506-2-jszhang@kernel.org \
--to=jszhang@kernel.org \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.