• Hans de Goede's avatar
    Input: soc_button_array - fix mapping of the 5th GPIO in a PNP0C40 device · 45040e92
    Hans de Goede authored
    [ Upstream commit e9eb788f ]
    
    The Microsoft documenation for the PNP0C40 device aka the
    "Windows-compatible button array" describes the 5th GpioInt listed in
    the resources as: '5. Interrupt corresponding to the "Rotation Lock"
    button, if supported'.
    
    Notice this describes the 5th entry as a button while we sofar have been
    mapping it to EV_SW, SW_ROTATE_LOCK. On my Point of View TAB P1006W-232
    which actually comes with a rotation-lock button, the button indeed is a
    button and not a slider/switch. An image search for other Windows tablets
    has found 2 more models with a rotation-lock button and on both of those
    it too is a push-button and not a slider/switch.
    
    Further evidence can be found in the HUT extension HUTRR52 from Microsoft
    which adds rotation lock support to the HUT, which describes 2 different
    usages: "0xC9 System Display Rotation Lock Button" and
    "0xCA System Display Rotation Lock Slider Switch" note that switch is seen
    as a separate thing here and the non switch wording is an exact match for
    the "Windows-compatible button array" spec wording.
    
    TL;DR: our current mapping of the 5th GPIO to SW_ROTATE_LOCK is wrong
    because the 5th GPIO is for a push-button not a switch.
    
    This commit fixes this by maping the 5th GPIO to KEY_ROTATE_LOCK_TOGGLE.
    Signed-off-by: 's avatarHans de Goede <hdegoede@redhat.com>
    Signed-off-by: 's avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: 's avatarSasha Levin <sashal@kernel.org>
    45040e92
Name
Last commit
Last update
Documentation Loading commit data...
LICENSES Loading commit data...
arch Loading commit data...
block Loading commit data...
certs Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
firmware Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
samples Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
tools Loading commit data...
usr Loading commit data...
virt Loading commit data...
.clang-format Loading commit data...
.cocciconfig Loading commit data...
.get_maintainer.ignore Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...