| From | Linus Walleij <> | Date | Wed, 31 Jan 2024 20:36:02 +0100 | Subject | Re: [PATCH 04/22] gpio: provide and use gpiod_get_label() |
| |
On Tue, Jan 30, 2024 at 1:48 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > We will soon serialize access to the descriptor label using SRCU. The > write-side of the protection will require calling synchronize_srcu() > which must not be called from atomic context. We have two irq helpers: > gpiochip_lock_as_irq() and gpiochip_unlock_as_irq() that set the label > if the GPIO is not requested but is being used as interrupt. They are > called with a spinlock held from the interrupt subsystem. > > They must not do it if we are to use SRCU so instead let's move the > special corner case to a dedicated getter. > > First: let's implement and use the getter where it's applicable. > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
After seeing the clever trick in the next patch I realized why you do this. Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours, Linus Walleij
|