summaryrefslogtreecommitdiff
path: root/drivers/nfc/st95hf
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2026-07-24 16:00:15 -0700
committerDavid Heidelberg <david@ixit.cz>2026-08-11 18:14:01 +0200
commit9f69d05b5a85c417c73fa2d5c7a2d507ac81cf4b (patch)
treee9adc89252fa1d008717252de15f01d2008a3bcc /drivers/nfc/st95hf
parent11a8f09e7f2313383851453285479f5c6843b39d (diff)
nfc: st95hf: switch to using sleeping variants of gpiod API
The driver does not use gpiod API calls in an atomic context. Switch to gpiod_set_value_cansleep() calls to allow using the driver with GPIO controllers that might need process context to operate. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Link: https://patch.msgid.link/amPsnh9wDIG2CeSi@google.com Signed-off-by: David Heidelberg <david@ixit.cz>
Diffstat (limited to 'drivers/nfc/st95hf')
-rw-r--r--drivers/nfc/st95hf/core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/nfc/st95hf/core.c b/drivers/nfc/st95hf/core.c
index 321fbe8aeca8..4d772a308bff 100644
--- a/drivers/nfc/st95hf/core.c
+++ b/drivers/nfc/st95hf/core.c
@@ -450,19 +450,19 @@ static int st95hf_select_protocol(struct st95hf_context *stcontext, int type)
static void st95hf_send_st95enable_negativepulse(struct st95hf_context *st95con)
{
/* First make irq_in pin high */
- gpiod_set_value(st95con->enable_gpiod, HIGH);
+ gpiod_set_value_cansleep(st95con->enable_gpiod, HIGH);
/* wait for 1 milisecond */
usleep_range(1000, 2000);
/* Make irq_in pin low */
- gpiod_set_value(st95con->enable_gpiod, LOW);
+ gpiod_set_value_cansleep(st95con->enable_gpiod, LOW);
/* wait for minimum interrupt pulse to make st95 active */
usleep_range(1000, 2000);
/* At end make it high */
- gpiod_set_value(st95con->enable_gpiod, HIGH);
+ gpiod_set_value_cansleep(st95con->enable_gpiod, HIGH);
}
/*