platform/x86: lenovo-yogabook-wmi: Add support for hall sensor on the back
authorHans de Goede <hdegoede@redhat.com>
Sun, 28 Nov 2021 19:00:31 +0000 (20:00 +0100)
committerHans de Goede <hdegoede@redhat.com>
Tue, 7 Dec 2021 11:21:01 +0000 (12:21 +0100)
commit1c5ec99891bb6a2d5487b9ab7c259698a601b95c
treea045dd828ff965702f5423e46694c2af085a4d6d
parentc0549b72d99df4616632b6b7dd0e82c6bf49b021
platform/x86: lenovo-yogabook-wmi: Add support for hall sensor on the back

On the back of the device there is a Hall sensor connected to the
"INT33FF:02" GPIO controller pin 18, which gets triggered when the
device is fully folded into tablet-mode (when the back of the display
touches the back of the keyboard).

Use this to disable both the touch-keyboard and the digitizer when
the tablet is fully folded into tablet-mode.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211128190031.405620-5-hdegoede@redhat.com
drivers/platform/x86/lenovo-yogabook-wmi.c