[lkml]   [2019]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] iio: accel: add missing sensor for some 2-in-1 based ultrabooks

On 02-04-19 18:04, Luís Ferreira wrote:
> Some ultrabooks, like Teclast F6 Pro, use KIOX010A sensor on display
> and KIOX020A sensor on keyboard base, to detect tablet mode or screen
> orientation.

I deliberately left out the KIOX020A id for now, because currently
userspace cannot really deal with having 2 sensors.


Basically we need to come up with a convention to (optionally) indicate
the sensors location with a udev attribute set by:

And then patch iio-sensor-proxy to consume that attribute and ignore
the one which has e.g. ACCEL_LOCATION=keyboard in its udev properties

Ignoring would be a first step, maybe later it can do something useful
with it, see e.g. :

IMHO we really should minimally get code in place for iio-sensor-proxy
to ignore the keyboard accelerometer before merging this patch.

I realize that having the code in place will not magically get it on
all users machines, but I believe this is the minimum which needs to
happen before we push this out and potentially breaks people screen

I've had working on this on my TODO list for a long long time now,
but -ENOTIME. If you have some time to work on this then that would
be great.



> Signed-off-by: Luís Ferreira <>
> ---
> drivers/iio/accel/kxcjk-1013.c | 1 +
> 1 file changed, 1 insertion(+)
> diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c
> index 7096e577b23f..9a5e445facc1 100644
> --- a/drivers/iio/accel/kxcjk-1013.c
> +++ b/drivers/iio/accel/kxcjk-1013.c
> @@ -1492,6 +1492,7 @@ static const struct acpi_device_id kx_acpi_match[] = {
> {"KIOX0009", KXTJ21009},
> {"KIOX000A", KXCJ91008},
> {"KIOX010A", KXCJ91008}, /* KXCJ91008 inside the display of a 2-in-1 */
> + {"KIOX020A", KXCJ91008},
> {"KXTJ1009", KXTJ21009},
> {"KXJ2109", KXTJ21009},
> {"SMO8500", KXCJ91008},

 \ /
  Last update: 2019-04-03 11:11    [W:0.069 / U:38.660 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site