All of lore.kernel.org
 help / color / mirror / Atom feed
* PROBLEM: Lenovo ALS sensor disguised under custom usage
@ 2022-11-16 12:11 Philipp Jungkamp
  2022-11-16 23:19 ` [PATCH 1/3] HID: hid-sensor-custom: More custom iio sensors Philipp Jungkamp
  0 siblings, 1 reply; 25+ messages in thread
From: Philipp Jungkamp @ 2022-11-16 12:11 UTC (permalink / raw)
  To: Jiri Kosina, Jonathan Cameron, Srinivas Pandruvada; +Cc: linux-iio

Hello,

my Lenovo Yoga 9 14IAP7 includes several sensors above the screen which
are connected to the Intel ISH of this device. The report descriptor of
the sensor hub categorizes them in a custom usage. But fields under
that usage are clearly those of a sensor.

I went ahead and activated the sensor I believed to be for ambient
light sensing and checked the values reported. The sensor behaves like
a virtual ISH sensor. It does not report values on a synchronous
request. But, when in buffered mode, reports the light-level as
expected.

A modified version of hid-sensor-custom.c allowed for other known
sensors beside the intel-custom-hinge-sensor and exposed it under a
modified name as an hid sensor. I slightly modified the
hid-sensor-als.c to allow it to bind to this device and it works
without problems.

But, maybe a little late, I'm considering whether a fixup for the ish
report descriptor would be the better way to go.

I'll post the patches I used in reply to this message for discussion.
And I'd really like to see at least the ambient light sensor working on
mainline as an iio-sensor.

Lenovo seems to use the sensors for some proprietary features of their
Lenovo Vantage application under the name Lenovo Intelligent Sensing
Solution.

Regards,
Philipp Jungkamp


I used this fish script to query some information on the sensors:
https://raw.githubusercontent.com/PJungkamp/yoga9-linux/main/intel-ish/find_sensors.fish

Which yields this output on my device:
https://raw.githubusercontent.com/PJungkamp/yoga9-linux/main/intel-ish/sensors.txt

Here is the report descriptor for the relevant ISH device (already
decoded text file):
https://raw.githubusercontent.com/PJungkamp/yoga9-linux/main/intel-ish/ish_report_descriptor




^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2022-11-23 17:17 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-16 12:11 PROBLEM: Lenovo ALS sensor disguised under custom usage Philipp Jungkamp
2022-11-16 23:19 ` [PATCH 1/3] HID: hid-sensor-custom: More custom iio sensors Philipp Jungkamp
2022-11-16 23:19   ` [PATCH 2/3] IIO: hid-sensor-als: Use generic usage Philipp Jungkamp
2022-11-17 15:09     ` Jonathan Cameron
2022-11-16 23:19   ` [PATCH 3/3] IIO: hid-sensor-prox: " Philipp Jungkamp
2022-11-17 15:14     ` Jonathan Cameron
2022-11-17 15:05   ` [PATCH 1/3] HID: hid-sensor-custom: More custom iio sensors Jonathan Cameron
2022-11-17 23:42     ` [PATCH v2 1/4] HID: hid-sensor-custom: Allow more " Philipp Jungkamp
2022-11-17 23:43       ` [PATCH v2 2/4] HID: hid-sensor-custom: Add LISS custom sensors Philipp Jungkamp
2022-11-18 20:16         ` srinivas pandruvada
2022-11-17 23:43       ` [PATCH v2 3/4] IIO: hid-sensor-als: Use generic usage Philipp Jungkamp
2022-11-17 23:43       ` [PATCH v2 4/4] IIO: hid-sensor-prox: " Philipp Jungkamp
2022-11-18 20:11       ` [PATCH v2 1/4] HID: hid-sensor-custom: Allow more custom iio sensors srinivas pandruvada
2022-11-17 23:48     ` [PATCH v3 " Philipp Jungkamp
2022-11-17 23:48       ` [PATCH v3 2/4] HID: hid-sensor-custom: Add LISS custom sensors Philipp Jungkamp
2022-11-17 23:48       ` [PATCH v3 3/4] IIO: hid-sensor-als: Use generic usage Philipp Jungkamp
2022-11-18 20:23         ` srinivas pandruvada
2022-11-21 17:59           ` Jiri Kosina
2022-11-21 19:55             ` srinivas pandruvada
2022-11-23 17:16         ` Jonathan Cameron
2022-11-17 23:48       ` [PATCH v3 4/4] IIO: hid-sensor-prox: " Philipp Jungkamp
2022-11-18 20:26         ` srinivas pandruvada
2022-11-23 17:17         ` Jonathan Cameron
2022-11-23 17:08       ` [PATCH v3 1/4] HID: hid-sensor-custom: Allow more custom iio sensors Jonathan Cameron
2022-11-23 17:10       ` Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.