[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZsTGO46wSsIuMQdf@google.com>
Date: Tue, 20 Aug 2024 09:37:15 -0700
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Krzysztof Kozlowski <krzk@...nel.org>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] nfc: st95hf: switch to using sleeping variants
of gpiod API
On Tue, Aug 20, 2024 at 08:26:14AM -0700, Jakub Kicinski wrote:
> On Mon, 19 Aug 2024 18:10:32 -0700 Dmitry Torokhov wrote:
> > The driver does not 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.
>
> Could you explain why? Are you using this device? Is it part of some
> larger effort to remove an API?
Because it is better to use sleeping variants of gpiod API unless the
call is in atomic context, so it is basic code hygiene. We do not want
other drivers to copy the behavior.
I was going through my WIP patches and decided to sent it out. Originally
it was part of overall transition of the driver to gpiod API, but Andy
Shevchenko beat me to it, so movement to gpiod_set_value_cansleep()
is all that is left.
Thanks.
--
Dmitry
Powered by blists - more mailing lists