linux/drivers/input/misc
Hans de Goede 78a5b53e9f Input: soc_button_array - work around DSDTs which modify the irqflags
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@redhat.com>
Link: https://lore.kernel.org/r/20200906122016.4628-2-hdegoede@redhat.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-09-13 23:08:48 -07:00
..
88pm80x_onkey.c
88pm860x_onkey.c
ab8500-ponkey.c
ad714x-i2c.c
ad714x-spi.c
ad714x.c
ad714x.h
adxl34x-i2c.c
adxl34x-spi.c
adxl34x.c
adxl34x.h
apanel.c
arizona-haptics.c
ati_remote2.c Input: ati_remote2 - add missing newlines when printing module parameters 2020-07-21 22:33:28 -07:00
atlas_btns.c
atmel_captouch.c
axp20x-pek.c
bma150.c
cm109.c
cma3000_d0x_i2c.c
cma3000_d0x.c
cma3000_d0x.h
cobalt_btns.c
cpcap-pwrbutton.c
da9052_onkey.c
da9055_onkey.c
da9063_onkey.c
dm355evm_keys.c
drv260x.c
drv2665.c
drv2667.c
e3x0-button.c
gpio_decoder.c
gpio-beeper.c
gpio-vibra.c
hisi_powerkey.c
hp_sdc_rtc.c
ideapad_slidebar.c
ims-pcu.c Input: ims-pcu - return error code rather than -ENOMEM 2020-08-06 17:33:40 -07:00
iqs269a.c
ixp4xx-beeper.c
Kconfig
keyspan_remote.c
kxtj9.c
m68kspkr.c
Makefile
max8925_onkey.c
max8997_haptic.c
max77650-onkey.c
max77693-haptic.c
mc13783-pwrbutton.c
mma8450.c
palmas-pwrbutton.c
pcap_keys.c
pcf8574_keypad.c
pcf50633-input.c
pcspkr.c
pm8xxx-vibrator.c
pm8941-pwrkey.c
pmic8xxx-pwrkey.c
powermate.c
pwm-beeper.c
pwm-vibra.c
rave-sp-pwrbutton.c
rb532_button.c
regulator-haptic.c
retu-pwrbutton.c
rk805-pwrkey.c
rotary_encoder.c
sc27xx-vibra.c
sgi_btns.c
sirfsoc-onkey.c
soc_button_array.c Input: soc_button_array - work around DSDTs which modify the irqflags 2020-09-13 23:08:48 -07:00
sparcspkr.c
stpmic1_onkey.c
tps65218-pwrbutton.c
twl4030-pwrbutton.c
twl4030-vibra.c
twl6040-vibra.c
uinput.c
wistron_btns.c
wm831x-on.c
xen-kbdfront.c
yealink.c
yealink.h