Bug 195681

Summary: Raw data from accelerometer not changing
Product: Drivers Reporter: Arek Burdach (arek.burdach)
Component: I2CAssignee: Drivers/I2C virtual user (drivers-i2c)
Status: NEW ---    
Severity: normal CC: srinivas.pandruvada
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 4.11.0 Subsystem:
Regression: No Bisected commit-id:
Attachments: yoga 910 quirk
dmesg with i2c_hid debug on
dmesg hid_descr_cmd failed
dmesg after 9d6408433019 + unintialized vars fixes
content of /sys/bus/i2c/devices/i2c-ITE8186:00/power
content of /sys/bus/iio/devices/iio:device1/power

Description Arek Burdach 2017-05-06 22:02:35 UTC
My configuration is: Lenovo Yoga 910.
Values reported by accelerometer inside: devices/pci0000:00/0000:00:15.3/i2c_designware.2/i2c-7/i2c-ITE8186:00/0018:048D:8186.0012/HID-SENSOR-200073.2.auto/iio:device0/*_raw have always the same values x: 31, y: 64849, z: 64826 - no meter how I hold the notebook. Timestamp also not changing. There is such a log inside my dmesg:
i2c_hid i2c-ITE8186:00: i2c-ITE8186:00 supply vdd not found, using dummy regulator
Comment 1 Arek Burdach 2017-05-15 21:23:24 UTC
Created attachment 256549 [details]
yoga 910 quirk

Added similar quirk like for yoga 900
Comment 2 Srinivas Pandruvada 2017-05-18 16:19:49 UTC
I have Yoga 900 with 4.11 kernel. I see the data change.
What is your kernel version?
Comment 3 Arek Burdach 2017-05-19 07:12:05 UTC
Hi. Thank you  for your response. I've tested on: 4.10, 4.11 and 4.12-rc1. The same behavior on each one of them.
Comment 4 Arek Burdach 2017-05-21 13:58:38 UTC
Created attachment 256643 [details]
dmesg with i2c_hid debug on

I've attached dmesg log for turned on debug flag for i2c_hid module
Comment 5 Arek Burdach 2017-05-21 16:00:15 UTC
Created attachment 256645 [details]
dmesg hid_descr_cmd failed

I've tested newest kernel after "9d6408433019bfae15e2d0d5f4498c4ff70b86c0  i2c: designware: don't infer timings described by ACPI from clock rate" fix. It looks like after that, driver stopped to work at all - no device is exposed in sysfs. Also touchpad stopped to work.
Comment 6 Arek Burdach 2017-05-22 07:28:00 UTC
Created attachment 256651 [details]
dmesg after 9d6408433019 + unintialized vars fixes

Jan Kiszka's fix of unintialized vars make devices works again but still no changes from accelometers. Attaching dmesg after newest changes in designware module.
Comment 7 Arek Burdach 2017-05-22 20:15:26 UTC
Created attachment 256671 [details]
content of /sys/bus/i2c/devices/i2c-ITE8186:00/power
Comment 8 Arek Burdach 2017-05-22 20:17:25 UTC
Created attachment 256673 [details]
content of /sys/bus/iio/devices/iio:device1/power

runtime_enabled = disabled looks the worst
Comment 9 Srinivas Pandruvada 2017-05-23 02:33:17 UTC
I will try to get a yoga 910 and check. I don't know why this is different than Yoga 900.
Comment 10 Arek Burdach 2017-07-16 07:31:33 UTC
It looks like adding quirk (attached in patch) helped a little. But there is also other bug https://bugzilla.kernel.org/show_bug.cgi?id=111321 making sensor state non-deterministicly active/inactive after reboot.