Re: [PATCH] Input: soc_button_array - Work around DSDTs which modify the irqflags

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

 



On Sun, Sep 06, 2020 at 02:20:16PM +0200, Hans de Goede wrote:
> Some 2-in-1s which use the soc_button_array driver have this ugly issue in
> their DSDT where the _LID method modifies the irq-type settings of the
> GPIOs used for the power and home buttons. The intend of this AML code is
> to disable these buttons when the lid is closed.
> 
> The AML does this by directly poking the GPIO controllers registers. This
> is problematic because when re-enabling the irq, which happens whenever
> _LID gets called with the lid open (e.g. on boot and on resume), it sets
> the irq-type to IRQ_TYPE_LEVEL_LOW. Where as the gpio-keys driver programs
> the type to, and expects it to be, IRQ_TYPE_EDGE_BOTH.
> 
> This commit adds a workaround for this which (on affected devices) does
> not set gpio_keys_button.gpio on these 2-in-1s, instead it gets the irq for
> the GPIO, configures it as IRQ_TYPE_LEVEL_LOW (to match how the _LID AML
> code configures it) and passes the irq in gpio_keys_button.irq.
> 
> Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>

Applied, thank you.

-- 
Dmitry



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux