diff options
author | Hans de Goede <hdegoede@redhat.com> | 2021-05-23 19:01:01 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-06-09 21:53:15 +0200 |
commit | addab6febc42ed94e4eee1abbe486150e4f8b9e9 (patch) | |
tree | 48c2dacf1baa4e9dbc7a67586aed91e603924682 /drivers/iio/adc/lpc18xx_adc.c | |
parent | iio: accel: bmc150: Remove bmc150_set/get_second_device() accessor functions (diff) | |
download | linux-addab6febc42ed94e4eee1abbe486150e4f8b9e9.tar.xz linux-addab6febc42ed94e4eee1abbe486150e4f8b9e9.zip |
iio: accel: bmc150: Add support for DUAL250E ACPI DSM for setting the hinge angle
Some 360 degree hinges (yoga) style 2-in-1 devices use 2 bmc150 accels
to allow the OS to determine the angle between the display and the base
of the device, so that the OS can determine if the 2-in-1 is in laptop
or in tablet-mode.
On Windows both accelerometers are read (polled) by a special service
and this service calls the DSM (Device Specific Method), which in turn
translates the angles to one of laptop/tablet/tent/stand mode and then
notifies the EC about the new mode and the EC then enables or disables
the builtin keyboard and touchpad based in the mode.
When the 2-in-1 is powered-on or resumed folded in tablet mode the
EC senses this independent of the DSM by using a HALL effect sensor
which senses that the keyboard has been folded away behind the display.
At power-on or resume the EC disables the keyboard based on this and
the only way to get the keyboard to work after this is to call the
DSM to re-enable it.
Call the DSM on probe() and resume() to fix the keyboard not working
when powered-on / resumed in tablet-mode.
This patch was developed and tested on a Lenovo Yoga 300-IBR.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20210523170103.176958-8-hdegoede@redhat.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/adc/lpc18xx_adc.c')
0 files changed, 0 insertions, 0 deletions