Skip to content
/ linux Public

Commit 4de9ed2

Browse files
iangehcgregkh
authored andcommitted
NFC: nxp-nci: allow GPIOs to sleep
commit 55dc632 upstream. 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 -- Fixes: 4320176 ("NFC: nxp-nci: Convert to use GPIO descriptor") Cc: stable@vger.kernel.org Signed-off-by: Ian Ray <ian.ray@gehealthcare.com> Link: https://patch.msgid.link/20260317085337.146545-1-ian.ray@gehealthcare.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 8dd23bb commit 4de9ed2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/nfc/nxp-nci/i2c.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ static int nxp_nci_i2c_set_mode(void *phy_id,
4747
{
4848
struct nxp_nci_i2c_phy *phy = (struct nxp_nci_i2c_phy *) phy_id;
4949

50-
gpiod_set_value(phy->gpiod_fw, (mode == NXP_NCI_MODE_FW) ? 1 : 0);
51-
gpiod_set_value(phy->gpiod_en, (mode != NXP_NCI_MODE_COLD) ? 1 : 0);
50+
gpiod_set_value_cansleep(phy->gpiod_fw, (mode == NXP_NCI_MODE_FW) ? 1 : 0);
51+
gpiod_set_value_cansleep(phy->gpiod_en, (mode != NXP_NCI_MODE_COLD) ? 1 : 0);
5252
usleep_range(10000, 15000);
5353

5454
if (mode == NXP_NCI_MODE_COLD)

0 commit comments

Comments
 (0)