mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
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>
This commit is contained in:
parent
11a8f09e7f
commit
9f69d05b5a
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user