From: Charalampos Mitrodimas <charmitro@posteo.net>
To: Ian Ray <ian.ray@gehealthcare.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] nfc: nxp-nci: allow GPIOs to sleep
Date: Fri, 20 Feb 2026 13:16:56 +0000 [thread overview]
Message-ID: <875x7rblmg.fsf@posteo.net> (raw)
In-Reply-To: <20260220115906.102470-1-ian.ray@gehealthcare.com>
Ian Ray <ian.ray@gehealthcare.com> writes:
> Allow the firmware and enable GPIOs to sleep.
>
> This fixes a `WARN_ON' and allows the driver to operate GPIOs which are
> connected to I2C GPIO expanders.
>
> -- >8 --
> kernel: WARNING: CPU: 3 PID: 2636 at drivers/gpio/gpiolib.c:3880 gpiod_set_value+0x88/0x98
> -- >8 --
>
> Signed-off-by: Ian Ray <ian.ray@gehealthcare.com>
> ---
> drivers/nfc/nxp-nci/i2c.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/nfc/nxp-nci/i2c.c b/drivers/nfc/nxp-nci/i2c.c
> index 6a5ce8ff91f0..b3d34433bd14 100644
> --- a/drivers/nfc/nxp-nci/i2c.c
> +++ b/drivers/nfc/nxp-nci/i2c.c
> @@ -47,8 +47,8 @@ static int nxp_nci_i2c_set_mode(void *phy_id,
> {
> struct nxp_nci_i2c_phy *phy = (struct nxp_nci_i2c_phy *) phy_id;
>
> - gpiod_set_value(phy->gpiod_fw, (mode == NXP_NCI_MODE_FW) ? 1 : 0);
> - gpiod_set_value(phy->gpiod_en, (mode != NXP_NCI_MODE_COLD) ? 1 : 0);
> + gpiod_set_value_cansleep(phy->gpiod_fw, (mode == NXP_NCI_MODE_FW) ? 1 : 0);
> + gpiod_set_value_cansleep(phy->gpiod_en, (mode != NXP_NCI_MODE_COLD) ? 1 : 0);
Do we need a Fixes tag here?
AFAICT this was introduced in
6be88670fc59 ("NFC: nxp-nci_i2c: Add I2C support to NXP NCI driver")
which used gpio_set_value() instead of gpio_set_value_cansleep() from
the beginning (that is before transitioning to gpiod_* calls in
43201767b44c ("NFC: nxp-nci: Convert to use GPIO descriptor").
This piece of code is present on active stable trees. So you also need
to Cc stable?
Cheers,
C. Mitrodimas
> usleep_range(10000, 15000);
>
> if (mode == NXP_NCI_MODE_COLD)
next prev parent reply other threads:[~2026-02-20 13:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-20 11:59 [PATCH] nfc: nxp-nci: allow GPIOs to sleep Ian Ray
2026-02-20 13:16 ` Charalampos Mitrodimas [this message]
2026-02-20 13:41 ` Ian Ray
2026-02-20 13:19 ` Andrew Lunn
2026-02-20 13:28 ` Ian Ray
2026-02-20 13:38 ` Ian Ray
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=875x7rblmg.fsf@posteo.net \
--to=charmitro@posteo.net \
--cc=ian.ray@gehealthcare.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox