Re: [PATCH] gpio: core: Do not call get_direction in atomic context for sleeping gpio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 24, 2016 at 3:18 PM, Laxman Dewangan <ldewangan@xxxxxxxxxx> wrote:

> When adding the gpiochip, the GPIO HW drivers' callback get_direction()
> get called in atomic context. Some of the GPIO HW drivers can sleep when
> accessing the register and hence it can create the sleeping call in
> atomic context.
>
> Call get_direction() in non-atomic context from gpiochip_add() if GPIO
> HW driver is having sleepable callback i.e. chip->can_sleep = 1.
>
> Signed-off-by: Laxman Dewangan <ldewangan@xxxxxxxxxx>
>
> ---
> This is found when implementing the get_direction() of max77620 on 20160520
> linux-next.

I chose to send a new patch just moving the lock release before the
direction check. I just sent it with you as Reported-by.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux