From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 2/4] gpio: pca953x: depend on i2c slice
Date: Wed, 21 Feb 2024 15:27:58 +0100 [thread overview]
Message-ID: <20240221142800.1958810-3-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20240221142800.1958810-1-s.hauer@pengutronix.de>
The GPIOs provided by the pca953x cannot be used inside a poller while
the I2C controller is in use. Add a dependency to from the GPIO
controller to the I2C controller for this purpose.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/gpio/gpio-pca953x.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index cee60f7a65..e303f6b21f 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -475,6 +475,8 @@ static int pca953x_probe(struct device *dev)
if (ret)
return ret;
+ slice_depends_on(gpiochip_slice(&chip->gpio_chip), i2c_client_slice(client));
+
if (pdata && pdata->setup) {
ret = pdata->setup(client, chip->gpio_chip.base,
chip->gpio_chip.ngpio, pdata->context);
--
2.39.2
next prev parent reply other threads:[~2024-02-21 14:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-21 14:27 [PATCH 0/4] make I2C GPIO expander provided buttons work Sascha Hauer
2024-02-21 14:27 ` [PATCH 1/4] gpio: add slice support Sascha Hauer
2024-02-21 14:27 ` Sascha Hauer [this message]
2024-02-21 14:27 ` [PATCH 3/4] input: gpio_keys: limit poll rate Sascha Hauer
2024-02-21 14:28 ` [PATCH 4/4] input: gpio_keys: only use gpios in poller when not in use Sascha Hauer
2024-02-23 7:32 ` [PATCH 0/4] make I2C GPIO expander provided buttons work Sascha Hauer
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=20240221142800.1958810-3-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox