Channel data values for IIO based st_sensors (st_accel, st_pressure) are incorrect
Bug #1676356 reported by
Shrirang Bagul
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
HWE Next |
Fix Released
|
Critical
|
Shrirang Bagul | ||
linux (Ubuntu) |
Fix Released
|
Critical
|
Shrirang Bagul | ||
Bug Description
Multi-channel reads from IIO based st_sensors (st_pressure and st_accel) drivers fail to report correct results through the devfs (/dev/iio:deviceX) interface.
Dell IoT gateways have sensors which uses IIO kernel drivers to read values from STM accelerometer (lng2dm) and pressure sensor (lps22hb). Pressure, temperature and acceleration channel values are incorrect and not in agreement with the values reported from sysfs with the present drivers in Ubuntu Xenial kernel.
This bug is used for tracking purposes, please do not triage.
CVE References
Changed in linux (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → Critical |
assignee: | nobody → Shrirang Bagul (shrirang-bagul) |
tags: | added: originate-from-1671050 plano |
Changed in hwe-next: | |
status: | New → Confirmed |
importance: | Undecided → Critical |
assignee: | nobody → Shrirang Bagul (shrirang-bagul) |
tags: | added: originate-from-1671056 |
tags: | removed: originate-from-1671056 |
tags: | added: originate-from-1671056 |
description: | updated |
description: | updated |
Changed in hwe-next: | |
status: | Confirmed → Fix Released |
To post a comment you must log in.
More details:
st_pressure: lps22hb: ======= =======
=======
Temperature reading on pressure sensor LPS22HB is not correct from IIO sysfs or devfs
Reading from I2C: 37.64 °C
Reading from IIO sysfs: 0 °C
in_temp_raw: 0
in_temp_scale: 10
Reading from IIO devfs: -307200.0 °C
"0088" is the raw output for temperature got from following output:
root@caracalla:~# cat /dev/iio\:device3 | xxd -
00000000: ee14 3e66 0088 3614 3e66 0088 7914 3e66 ..>f..6.>f..y.>f
00000010: 0088 ff14 3e66 0088 ff14 3e66 0088 8214 ....>f....>f....
st_accel: lng2dm:
=================
Reading of accelerometer LNG2DM is not correct from IIO devfs
From I2C:
Reading of accel_x channel from I2C: 0.15298374 m/(s^2)
Reading of accel_y channel from I2C: 9.9439431 m/(s^2)
Reading of accel_z channel from I2C: 0.91790244 m/(s^2)
From IIO sysfs(Got by (raw + offset)*scale ):
Reading of accel_x channel from IIO sysfs: 0.152983 m/(s^2)
Reading of accel_y channel from IIO sysfs: 9.943895000000001 m/(s^2)
Reading of accel_z channel from IIO sysfs: 0.9178980000000001 m/(s^2)
From IIO devfs:
Reading of accel_x channel from IIO devfs: 0.152983 m/(s^2)
Reading of accel_y channel from IIO devfs: 0.0 m/(s^2)
Reading of accel_z channel from IIO devfs: 9.943895000000001 m/(s^2)
Have checked channel index: 0 for x, 1 for y, 2 for z
So "01" for x, "00" for y, "41" for z are the raw output got from following output:
root@caracalla:/# cat /dev/iio\:device2 | xxd -
00000000: 0100 4101 0041 0100 4101 0041 0000 4101 ..A..A..A..A..A.