Hmm, Second challenge is to detect if the angle is valid et all: if the hinge is close to vertical, calculated angles are changing in all possible ranges. So, re-implementing this "virtual sensor" in userspace using accelerometers seems to be a simpler way than trying to fixup invalid data that arrived from the ISH firmware. пт, 29 дек. 2023 г. в 19:57, Yauhen Kharuzhy <jekhor@xxxxxxxxx>: > > Hi, > > I have a device (Lenovo Yoga Book tablet) with a hinge angle sensor > exposed by Intel ISH. This virtual sensor should compute the hingle angle > based on the accelerometers data. It is supported by the > hid-sensor-custom-intel-hinge driver. > > The sensor has three channels: angles of base and screen with respect to the > ground, and the hinge angle between them. The base and sceen angles are > reported right, but the hinge angle is always 360°. > > What is the correct way to fix this? We can modify the driver and fixup > the hingle angle value in it, or add such quirk in a userspace apllication > like iio-sensor-proxy (this requires to have a blacklist of devices in > userspace apps). Should we try to correct the value of this sensor or > just blacklist it and re-implement the same functionality in userspace > based on accelerometers data? > > When fixing this in the driver, we should decide how to distinguish > 'fully open' and 'fully closed' states: we may need to check the lid > switch status for this. > > -- > Yauhen Kharuzhy -- Yauhen Kharuzhy