]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Input: axp20x-pek - do not register input device on some systems
authorHans de Goede <hdegoede@redhat.com>
Thu, 9 Mar 2017 17:55:49 +0000 (09:55 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 9 Mar 2017 18:01:03 +0000 (10:01 -0800)
commit9b13a4ca8d2c44ca659d8df65f15c48c2e9b9316
treec0bf099a5ea7155800a7d3724031315febcdad84
parentf2bd5a9ec5edc307e5f84dc9df14253898e19678
Input: axp20x-pek - do not register input device on some systems

On some systems (Intel tablets with axp288 pmic) the powerbutton is
also connected to a gpio pin of the SoC, advertised through the
"INTCFD9" / "PNP0C40" acpi device. This leads to double reporting
of powerbutton events, which is undesirable, so one driver needs
to not report input events in this case.

Since the soc_button_array driver for the "PNP0C40" acpi device
also handles wake from suspend on these tablets and since the
axp20x-pel driver requires relative expensive i2c accrsses,
it is best for the axp20x-pek driver to not register an input device
in this case.

Note that this commit leaves the axp20x-driver bound to the
device, rather then returning -ENODEV, this is done so that the
sysfs attributes it offers are kept around.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/axp20x-pek.c