Skip to contentSkip to conversation

sensor-hub: Move the memset to sensor_hub_get_feature()

DISCUSSION Ritesh Raj Sarraf 2 participants 11 messages Dec 28, 2016 – Dec 31, 2016 IIO

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hello Srini,

Regarding: https://www.spinics.net/lists/linux-input/msg48540.html

This patch does not seem to fix the issue entirely. On my machine, where on previous kernels from 4.7 and 4.8 worked fine, this patch hasn't made much difference on 4.9.

rrs@learner:~$ lspci
00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated
Graphics Controller (rev 0b)
00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio Controller (rev 0b)
00:14.0 USB controller: Intel Corporation 8 Series USB xHCI HC (rev 04)
00:16.0 Communication controller: Intel Corporation 8 Series HECI #0 (rev 04)
00:1b.0 Audio device: Intel Corporation 8 Series HD Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 4 (rev e4)
00:1d.0 USB controller: Intel Corporation 8 Series USB EHCI #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation 8 Series LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 8 Series SATA Controller 1 [AHCI
mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 8 Series SMBus Controller (rev 04)
01:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe
Wireless Network Adapter
2016-12-28 / 17:07:16 ♒♒♒  ☺  
rrs@learner:~$ uname -a
Linux learner 4.9.0+ #1 SMP Mon Dec 26 14:20:36 IST 2016 x86_64 GNU/Linux
2016-12-28 / 17:07:24 ♒♒♒  ☺  

- --
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEQCVDstmIVAB/Yn02pjpYo/LhdWkFAlhjpC0ACgkQpjpYo/Lh dWmnbBAAnzCzilRkwE1Oa0nANMvKC/YQJVV+dJeJq5XGAOks3Fe2goMTB4vcOSIj Crt1f3JD+0H6aC7+JqdByPa6oxtXMCX8sX8zwhFkLkS6ExAheTtyuUFpZeGytU4G e3Jm7dzWW6fa6MRTpSq8OwtdiMwBb3g6fe072npEheRuHEj5uex2AxzcHmP/DOiD ErTTLxY4ItcvZQURybWdsdOrVoWdh7uZj+KiQcBfNQvzQLpdDdL2ZfxGnt2Dsk2e PPNI7qyq2rYb+iA9U+65zKLQr8k6Q8y+MM9NqDKWDmhF6Jft9AKZIylwpUeN9/B/ m5g6b7NmwPQo8vdJdwfCJKusHrUp6WQ9Y2SOVJN9k4D8/lJepSfbL5MdX2A9KS1z clYwTDKVEWNsAWlahdDraZRujLhx3vBoMMESDGia/j4xrEMfOe26XclTp1rynopD oCW62UDugIm+l6GRjAfehYoPXtDSyBKTauW3LAZvUAELOvZX5T0SZqKJjbJmsp5m Wpwva9XNlX4N8g36BdUv04hbWxqbbNANGu8dO8Y+MSmMZRmYC2f2f+qY7s2711Dt Bc/5g8nLv602tkQbXm8hr66H/QKpivxn0oSbST3UHFzRlHUt9+k5LEIdezJwQ1RL 1fp6+9jc507TXMbId5GarYOwQHkLoBEIDPxQ6eTAEdo0rnQ7/PI= =bCkL
-----END PGP SIGNATURE-----

#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Oh! That did not include my usb listing. Please find it below. If you need more information, please tell me.

rrs@learner:~$ lsusb 
Bus 003 Device 002: ID 8087:8000 Intel Corp. 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 048d:8350 Integrated Technology Express, Inc. 
Bus 001 Device 005: ID 0bda:b728 Realtek Semiconductor Corp. 
Bus 001 Device 004: ID 04f2:b40f Chicony Electronics Co., Ltd 
Bus 001 Device 003: ID 04f3:0303 Elan Microelectronics Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
2016-12-28 / 18:51:08 ♒♒♒  ☺  

and

rrs@learner:~$ sudo lsusb  -v -d 048d:8350

Bus 001 Device 006: ID 048d:8350 Integrated Technology Express, Inc. Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level) bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x048d Integrated Technology Express, Inc. idProduct          0x8350
  bcdDevice           10.10
  iManufacturer           1 ITE Tech. Inc.
  iProduct                2 ITE Device(8350)
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device bInterfaceSubClass      0 No Subclass bInterfaceProtocol      0 None
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported bNumDescriptors         1
          bDescriptorType        34 Report wDescriptorLength    2913
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
Device Status:     0x0000
  (Bus Powered)
2016-12-28 / 18:52:05 ♒♒♒  ☺

Quoted 21 lines · Ritesh Raj Sarraf

Hello Srini,

Regarding: https://www.spinics.net/lists/linux-input/msg48540.html

This patch does not seem to fix the issue entirely. On my machine, where on previous kernels from 4.7 and 4.8 worked fine, this patch hasn't made much difference on 4.9.

rrs@learner:~$ lspci
00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated
Graphics Controller (rev 0b)
00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio Controller (rev
0b)
00:14.0 USB controller: Intel Corporation 8 Series USB xHCI HC (rev 04)
00:16.0 Communication controller: Intel Corporation 8 Series HECI #0 (rev 04)
00:1b.0 Audio device: Intel Corporation 8 Series HD Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 4 (rev
e4)
00:1d.0 USB controller: Intel Corporation 8 Series USB EHCI #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation 8 Series LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 8 Series SATA Controller 1 [AHCI
Quoted 11 lines
mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 8 Series SMBus Controller (rev 04)
01:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe
Wireless Network Adapter
2016-12-28 / 17:07:16 ♒♒♒  ☺  
rrs@learner:~$ uname -a
Linux learner 4.9.0+ #1 SMP Mon Dec 26 14:20:36 IST 2016 x86_64 GNU/Linux
2016-12-28 / 17:07:24 ♒♒♒  ☺  

- --
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEQCVDstmIVAB/Yn02pjpYo/LhdWkFAlhjvLYACgkQpjpYo/Lh dWlT+w//S9sfy8kxaCeM17XQLTmDgdcMS1ZFujBWqYgN/9Fo6OFYdbhytRfqOXPO t14uZVTKiDZ+KU36sNhLC+J0aLcldhLog7p9LBrcd4xzc2d6+GbfsnZ9ORffNINx tA9dsY0yeOhGwIgYjd4PpkuuHe2mHQrQ22eLfXgA2oDqXt1DidhK3z5IlK7FBJrg Mcm2wDxRVioI6Gf6lRihOrmW7O1GE0Ch4Vwbgi0C9IMBhq3xEHGZYGkcMTN5P5hq jai2a1kSMffGk4YeNeWLzsu0SSEo4OZCJ0eahbwCXa5/crkRB2DCeqvZ44TIyRr6 WKgt5lnLIGWqu9DZ+Rwzy4cT3rUEhAYrcyELn1Sz0EX7TRguioE3HjbJRwQ0qI+D dMQnSBsDR/LaYhSpTvQDiveSjzZ7lEDQCGPHTlxWQyxp0aZoGi0lEiVxgLGqpxn3 ily1CaV93nynQ66yCp7/F1xZtRFJhQ/5hqxxCcXQObe6PYTHJHbVLXrMnxw7HBko o6+fTvotFBCrbHgS3kH7sJUXRYMNCPi7tpia8pB1CcBQOUmhsuFklTkge0Q8CUJu PCFH6+ZDM2jP3THFk3E4nhpYSgYcxeprnakoi/WlyJTaLfQEHCLWRbOGbPlbFWhy TRgOZJ2cagtTkUhTueow8Lcu5Wk/nBAbPxC3uAvqoEYNb+fUahQ= =GsDS
-----END PGP SIGNATURE-----

#2 lore raw

Hi Ritesh,

Quoted 4 lines · Ritesh Raj Sarraf

Oh! That did not include my usb listing. Please find it below. If you need more
information, please tell me.

Did you pick up the latest iio-sensor-proxy? There was some changes required in that.

Also check under /sys/bus/iio/devices/iio:device* cat the raw x, y z for accelerometer and check if they change.

Thanks,
Srinivas

Quoted 124 lines
rrs@learner:~$ lsusb 
Bus 003 Device 002: ID 8087:8000 Intel Corp. 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 048d:8350 Integrated Technology Express, Inc. 
Bus 001 Device 005: ID 0bda:b728 Realtek Semiconductor Corp. 
Bus 001 Device 004: ID 04f2:b40f Chicony Electronics Co., Ltd 
Bus 001 Device 003: ID 04f3:0303 Elan Microelectronics Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
2016-12-28 / 18:51:08 ♒♒♒  ☺  

and

rrs@learner:~$ sudo lsusb  -v -d 048d:8350

Bus 001 Device 006: ID 048d:8350 Integrated Technology Express, Inc. Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level) bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x048d Integrated Technology Express, Inc. idProduct          0x8350
  bcdDevice           10.10
  iManufacturer           1 ITE Tech. Inc.
  iProduct                2 ITE Device(8350)
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device bInterfaceSubClass      0 No Subclass bInterfaceProtocol      0 None
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported bNumDescriptors         1
          bDescriptorType        34 Report wDescriptorLength    2913
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
Device Status:     0x0000
  (Bus Powered)
2016-12-28 / 18:52:05 ♒♒♒  ☺

Quoted 46 lines · Ritesh Raj Sarraf

Hello Srini,

Regarding: https://www.spinics.net/lists/linux-input/msg48540.html

This patch does not seem to fix the issue entirely. On my machine, where on
previous kernels from 4.7 and 4.8 worked fine, this patch hasn't made much
difference on 4.9.

rrs@learner:~$ lspci
00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT
Integrated
Graphics Controller (rev 0b)
00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio
Controller (rev
0b)
00:14.0 USB controller: Intel Corporation 8 Series USB xHCI HC (rev
04)
00:16.0 Communication controller: Intel Corporation 8 Series HECI
#0 (rev 04)
00:1b.0 Audio device: Intel Corporation 8 Series HD Audio
Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 8 Series PCI Express Root
Port 4 (rev
e4)
00:1d.0 USB controller: Intel Corporation 8 Series USB EHCI #1 (rev
04)
00:1f.0 ISA bridge: Intel Corporation 8 Series LPC Controller (rev
04)
00:1f.2 SATA controller: Intel Corporation 8 Series SATA Controller
1 [AHCI
mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 8 Series SMBus Controller (rev 04)
01:00.0 Network controller: Realtek Semiconductor Co., Ltd.
RTL8723BE PCIe
Wireless Network Adapter
2016-12-28 / 17:07:16 ♒♒♒  ☺  
rrs@learner:~$ uname -a
Linux learner 4.9.0+ #1 SMP Mon Dec 26 14:20:36 IST 2016 x86_64
GNU/Linux
2016-12-28 / 17:07:24 ♒♒♒  ☺  
#3 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi Srinivas,

Thank you very much for the quick reply.

Quoted 10 lines · Srinivas Pandruvada

Hi Ritesh,

Quoted 4 lines · Ritesh Raj Sarraf

Oh! That did not include my usb listing. Please find it below. If you need more
information, please tell me.

Did you pick up the latest iio-sensor-proxy? There was some changes required in that.

I tested it with 2.0, which was release around 3 weeks ago. Since then, there's been 1 single change from today. I've picked that up and am building it now. I'll share results with the newer proxy daemon soon.

Quoted 2 lines

Also check under /sys/bus/iio/devices/iio:device* cat the raw x, y z for accelerometer and check if they change.

Thanks for mentioning this. The output on my setup looks suspicious.

rrs@learner:/sys/bus/iio/devices$ while true; do for x in iio*; do echo -en "Device: $x\t `cat $x/*[x-z]_raw`\n"; done; echo -en "sleep 2 secs\n\n"; sleep 2;  done
Device: iio:device0	 553
6
3561
Device: iio:device1	 -1644531
441406
- -2484375
cat: 'iio:device2/*[x-z]_raw': No such file or directory
Device: iio:device2	 
Device: iio:device3	 22381
- -22381
0
cat: 'iio:device4/*[x-z]_raw': No such file or directory
Device: iio:device4	 
Device: iio:device5	 15
64615
65220
sleep 2 secs

Device: iio:device0 553
6
3561
Device: iio:device1 -1644531
441406
- -2484375
cat: 'iio:device2/*[x-z]_raw': No such file or directory
Device: iio:device2
Device: iio:device3 22381
- -22381
0
cat: 'iio:device4/*[x-z]_raw': No such file or directory
Device: iio:device4
Device: iio:device5 15
64615
65220
sleep 2 secs

Device: iio:device0 553
6
3561
Device: iio:device1 -1644531
441406
- -2484375
cat: 'iio:device2/*[x-z]_raw': No such file or directory
Device: iio:device2
Device: iio:device3 22381
- -22381
0
cat: 'iio:device4/*[x-z]_raw': No such file or directory
Device: iio:device4
Device: iio:device5 15
64615
65220
sleep 2 secs

Device: iio:device0 553
6
3561
Device: iio:device1 -1644531
441406
- -2484375
cat: 'iio:device2/*[x-z]_raw': No such file or directory
Device: iio:device2
Device: iio:device3 22381
- -22381
0
cat: 'iio:device4/*[x-z]_raw': No such file or directory
Device: iio:device4
Device: iio:device5 15
64615
65220
sleep 2 secs

Device: iio:device0 553
6
3561
Device: iio:device1 -1644531
441406
- -2484375
cat: 'iio:device2/*[x-z]_raw': No such file or directory
Device: iio:device2
Device: iio:device3 22381
- -22381
0
cat: 'iio:device4/*[x-z]_raw': No such file or directory
Device: iio:device4
Device: iio:device5 15
64615
65220
sleep 2 secs

Device: iio:device0 553
6
3561
Device: iio:device1 -1644531
441406
- -2484375
cat: 'iio:device2/*[x-z]_raw': No such file or directory
Device: iio:device2
Device: iio:device3 22381
- -22381
0
cat: 'iio:device4/*[x-z]_raw': No such file or directory
Device: iio:device4
Device: iio:device5 15
64615
65220
sleep 2 secs

Device: iio:device0 553
6
3561
Device: iio:device1 -1644531
441406
- -2484375
cat: 'iio:device2/*[x-z]_raw': No such file or directory
Device: iio:device2
Device: iio:device3 22381
- -22381
0
cat: 'iio:device4/*[x-z]_raw': No such file or directory
Device: iio:device4
Device: iio:device5 15
64615
65220
sleep 2 secs

Device: iio:device0 553
6
3561
Device: iio:device1 -1644531
441406
- -2484375
cat: 'iio:device2/*[x-z]_raw': No such file or directory
Device: iio:device2
Device: iio:device3 22381
- -22381
0
cat: 'iio:device4/*[x-z]_raw': No such file or directory
Device: iio:device4
Device: iio:device5 15
64615
65220
sleep 2 secs

^C
2016-12-28 / 22:46:54 ♒♒♒ ☹ => 130

rrs@learner:/sys/bus/iio/devices$ ls iio\:device2/
buffer/  in_intensity_both_raw    in_intensity_offset              in_intensity_scale  power/          subsystem@  uevent
dev      in_intensity_hysteresis  in_intensity_sampling_frequency  name                scan_elements/  trigger/
2016-12-28 / 22:47:08 ♒♒♒  ☺  
rrs@learner:/sys/bus/iio/devices$ cat iio\:device*/name
incli_3d
magn_3d
als
gyro_3d
dev_rotation
accel_3d
2016-12-28 / 22:47:29 ♒♒♒  ☺  

Device4, for which there are no x, y, z attributes, reports the name "dev_rotation". Even for the other devices, I see no change in the reported values.

- --
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEQCVDstmIVAB/Yn02pjpYo/LhdWkFAlhj9T8ACgkQpjpYo/Lh dWkhgw/+Kthf+DDvsRlJNUrLGqzXqZnAOA7Eqpp1NeGXhoMOSzszh5biosrxzsUc F99pBirxJ0E6RLHFIgTaX4BVy9KaRXH7bichOaRFn+BG7WgtxEJPtKbXxH0Wa/kQ MhCK0HLgVxmNtlPX1fZW6AzrIV+mEGiXFf5pItcv6PpgATHTMZb98XCahnygzNnX UZBBSRDcbOHKS8Fp3UER2IubuaBzn09x/5DsKwnaaOl6XILSG592fgY177vRcaq4 CH+UGLKal6YrAg/48e2Pi2G18RNWJiL2wDkqWL60wZB+++VGdseRmwdFAcrAPhQW FPhwO1+/3cnbMx/lQn9DjwQ9ZhsA5t8JupEc5zzH60NFpTfgUOy8LWeGbvAQwsI9 hlknmMDBiaT6hoJmEKp4aSiwYrJFcuRgBqOiuAyhIp+nzh8FlJkvzfFSiOaWKuXp wzsKRBfQ1CfbI9FqqL+tQiw4u98uR68itGIAnwWNdx8qXYlSPR0WZfc2AEQBlW4r +AO8LhDS+5/0YRwfIvvMD2UCG4COEidZulC/Z/pHt5akv4AIc5JwAzII/EAQg8UF 5Fj9BMLkmoExTwrFeK6ylphhrAfmtKz1K6fdE72r6P3Fn/L+drv0KJuIWtrjaWBO n4y5MSUPcJGOf0ykYLiBzXL7SEkz0g614ye1QFL5gpue+Kc2K6E= =dV5z
-----END PGP SIGNATURE-----

#4 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Quoted 3 lines · Ritesh Raj Sarraf

Device4, for which there are no x, y, z attributes, reports the name "dev_rotation".
Even for the other devices, I see no change in the reported values.

On the 4.8 kernel, the values do change. The iio-sensor-proxy still does not do the rotation.

rrs@learner:/sys/bus/iio/devices$ while true; do for x in iio*; do echo -en
"Device: $x\t `cat $x/*[x-z]_raw`\n"; done; echo -en "sleep 2 secs\n\n"; sleep
2;  done
Device: iio:device0	 616
6
3570
cat: 'iio:device1/*[x-z]_raw': No such file or directory
Device: iio:device1	 
Device: iio:device2	 111905
- -44762
- -22381
cat: 'iio:device3/*[x-z]_raw': No such file or directory
Device: iio:device3	 
Device: iio:device4	 27
64861
65298
Device: iio:device5	 -1625000
402343
- -2531250
sleep 2 secs

Device: iio:device0  616
6
3570
cat: 'iio:device1/*[x-z]_raw': No such file or directory
Device: iio:device1
Device: iio:device2  22381
0
0
cat: 'iio:device3/*[x-z]_raw': No such file or directory
Device: iio:device3
Device: iio:device4  27
64861
65298
Device: iio:device5  -1632812
402343
- -2531250
sleep 2 secs

Device: iio:device0  542
65503
3599
cat: 'iio:device1/*[x-z]_raw': No such file or directory
Device: iio:device1
Device: iio:device2  -111905
- -2887161
4274790
cat: 'iio:device3/*[x-z]_raw': No such file or directory
Device: iio:device3
Device: iio:device4  27
64861
65298
Device: iio:device5  -1625000
429687
- -2511718
sleep 2 secs

Device: iio:device0  94
64699
425
cat: 'iio:device1/*[x-z]_raw': No such file or directory
Device: iio:device1
Device: iio:device2  693814
- -223811
1589058
cat: 'iio:device3/*[x-z]_raw': No such file or directory
Device: iio:device3
Device: iio:device4  27
64861
65298
Device: iio:device5  -1539062
492187
- -2523437
sleep 2 secs

Device: iio:device0  145
893
2676
cat: 'iio:device1/*[x-z]_raw': No such file or directory
Device: iio:device1
Device: iio:device2  -738576
872862
- -6065278
cat: 'iio:device3/*[x-z]_raw': No such file or directory
Device: iio:device3
Device: iio:device4  27
64861
65298
Device: iio:device5  -1503906
230468
- -2609375
sleep 2 secs

Device: iio:device0  488
808
2692
cat: 'iio:device1/*[x-z]_raw': No such file or directory
Device: iio:device1
Device: iio:device2  2551445
- -3536213
14592477
cat: 'iio:device3/*[x-z]_raw': No such file or directory
Device: iio:device3
Device: iio:device4  27
64861
65298
Device: iio:device5  -1597656
222656
- -2621093
sleep 2 secs

Device: iio:device0  64240
750
2437
cat: 'iio:device1/*[x-z]_raw': No such file or directory
Device: iio:device1
Device: iio:device2  2663350
- -581908
3021448
cat: 'iio:device3/*[x-z]_raw': No such file or directory
Device: iio:device3
Device: iio:device4  27
64861
65298
Device: iio:device5  -1488281
347656
- -2601562
sleep 2 secs

Device: iio:device0  63984
891
2470
cat: 'iio:device1/*[x-z]_raw': No such file or directory
Device: iio:device1
Device: iio:device2  -358097
402859
- -828100
cat: 'iio:device3/*[x-z]_raw': No such file or directory
Device: iio:device3
Device: iio:device4  27
64861
65298
Device: iio:device5  -1468750
375000
- -2601562
sleep 2 secs

Device: iio:device0  1637
64842
524
cat: 'iio:device1/*[x-z]_raw': No such file or directory
Device: iio:device1
Device: iio:device2  11548647
2663350
- -16606776
cat: 'iio:device3/*[x-z]_raw': No such file or directory
Device: iio:device3
Device: iio:device4  27
64861
65298
Device: iio:device5  -1441406
50781
- -2585937
sleep 2 secs

Device: iio:device0  649
642
2564
cat: 'iio:device1/*[x-z]_raw': No such file or directory
Device: iio:device1
Device: iio:device2  -5237177
- -2126204
19225364
cat: 'iio:device3/*[x-z]_raw': No such file or directory
Device: iio:device3
Device: iio:device4  27
64861
65298
Device: iio:device5  -1652343
210937
- -2570312
sleep 2 secs

^C
2016-12-28 / 23:01:36 ♒♒♒  ☹  => 130
(reverse-i-search)`name': quilt rename data-Fix-compass-property-^Cme.patch2016- 12-28 / 23:01:54 ♒♒♒  ☹  => 130

rrs@learner:/sys/bus/iio/devices$ cat iio\:device*/name
incli_3d
als
gyro_3d
dev_rotation
accel_3d
magn_3d
2016-12-28 / 23:02:35 ♒♒♒  ☺  
rrs@learner:/sys/bus/iio/devices$ uname -a
Linux learner 4.8.15+ #47 SMP Wed Dec 21 14:19:46 IST 2016 x86_64 GNU/Linux
2016-12-28 / 23:02:41 ♒♒♒  ☺  

- --
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEQCVDstmIVAB/Yn02pjpYo/LhdWkFAlhj+EkACgkQpjpYo/Lh dWlAFhAAk882ZoICevpQH3kZ47WJKE/yrtOVQwmyxrkHa7kxWZVAfbZcr+Vlhktt GIa8zM/rZ7TXwy794iEZMvTR5f6ZGMojHLuKRBdvnEr7lYHg/7396Rrw5mlOWhmS /8B99ERQnDzmKExXcLts+4V6WbsWxJJlI4oNsaLn8vybZEImniDySqIehhKUEPtX escMhgAdgcpmbps2oJYfQ6Oa4kOQjx34KeTPIUBaLHyd89jYYwygWG0K8oQpfMuG tLcPrXOpgNBvyr4FHsHWhC9IYHIUArmKzyADnkaRJSbKjH/vh5lFw2FsjFNK2V2f /fyy0hO5AqLluE1/dDERejekm+0uQ9TAlWouvRfvgtaSeoTgTuFmce51tp8An/wq nzFBJJl085EgBby1NO2NJQwOd/Uh4TD3UBHIb5D8azlVXeN0his6ETWPQs00HHvn PUNQVYXxEXtzZPkWrUCMNFVktRS8kCNmp/Hty655Wkj+jNF54/JHAb/1jD1ak9nQ N0eTEBqHsthcZuSStmtsEfIZ0MybCY6xrqFc+uyoYvp3crqi4IPi96tlblU2lDiJ loceFx+Ks+Y1Kj31D/zKvIKuYDEtQH6VZMzbvDaCgmCDnhoHctXVIfT8hhbSur5V ubhHAx72xu5BFVzxJ3/0S685hVC1oBWq8fx/1lFsqA4GJILylJI= =dKU5
-----END PGP SIGNATURE-----

#5 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Quoted 8 lines · Ritesh Raj Sarraf
Quoted 3 lines · Ritesh Raj Sarraf

Device4, for which there are no x, y, z attributes, reports the name "dev_rotation".
Even for the other devices, I see no change in the reported values.

On the 4.8 kernel, the values do change. The iio-sensor-proxy still does not do
the rotation.

For the sake of completeness, I booted up iio-sensor-proxy (with latest patch from today), on both 4.8 and 4.9.

With 4.8, I am reliably able to see screen rotation. And for the record, on 4.8, the memset change is the old one.

With 4.9, nothing. Which may be expected given there were no data seen with those device attributes (when using cat).

If you need more information, please tell me.

- --
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEQCVDstmIVAB/Yn02pjpYo/LhdWkFAlhj/A8ACgkQpjpYo/Lh dWmrVBAAmvevxwMKsO9+rcOxa4QyuV1m8dX/j13eX3pz/qPQAP+sn/AeIS7B3HVT EdbSTAzAPEJGxR3KLxYP4+3L30RO4V94T371h9INujJWAFbu29J2p2WiUtTWtpLI ZtBrS4x7pPRUdn6io9AMKfGFSZdDoskfCHbCC/lUN05zXJnKZRYXSRispSJ6c02F f9A8zwaTGC+lrP3uLJ/0l9nPa545ivyCPYyfBrbpBedV/9NO2YfPbGxGETpUOEt+ 7YCxC2W/mVVmbm5bdAbZ8EwoWsl/AWuy93/A5AAse1LF1o//eZXc8Dry0VKzkm8t lq/yZYGwKLgT8vgQwoTyNSO19o+P96NY/WkiOxTCj4ZMHFAXz1+v1FWKDzwKlaPc Egyw1Go3Rd0xciZBmZeru6szmKL+daJBKhZSHyoMjYVtaxp49EtsDjkv7lhsUvWI hj2ctO8vLo1UNq+V26icP2ofaWuLpjd7hx9jTt5PhEEmK0yus3HnI0S417FMlDvU dqpJKLRTAdO6sGYyVuMs9U/7Q5mRAzEgeOHlLGkghCfH+163HPCY4uNq4QZ9wj5Y XioSJ/HjFW6R0Mxyr9jI5WcFQ82QcGsoOzocyjbxYWK7SFknRtkIDt3fQaEqvCSq 9tATFHcoUIQXCrk00uOj2ZYsBqlhN3PFaqJm9irSJdWpdnqUNtE= =5uwZ
-----END PGP SIGNATURE-----

#6 lore raw
Quoted 21 lines · Ritesh Raj Sarraf
Quoted 8 lines · Ritesh Raj Sarraf
Quoted 6 lines · Ritesh Raj Sarraf

Device4, for which there are no x, y, z attributes, reports the name
"dev_rotation".
Even for the other devices, I see no change in the reported values.

Quoted 4 lines

On the 4.8 kernel, the values do change. The iio-sensor-proxy still does not
do
the rotation.

For the sake of completeness, I booted up iio-sensor-proxy (with latest patch
from today), on both 4.8 and 4.9.

With 4.8, I am reliably able to see screen rotation. And for the record, on 4.8,
the memset change is the old one.

Quoted 6 lines

With 4.9, nothing. Which may be expected given there were no data seen with
those device attributes (when using cat).

If you need more information, please tell me.

I tried on couple of systems with the patch. It seems to fix the issue. It is possible some low level power related changes have impacted this. Can you do bisect? I suggest just try 4.9-rc1. I think it will not work there probably.

Thanks,
Srinivas

Quoted 2 lines
#7 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Quoted 6 lines · Srinivas Pandruvada
Quoted 1 line

If you need more information, please tell me.

I tried on couple of systems with the patch. It seems to fix the issue. It is possible some low level power related changes have impacted this. Can you do bisect? I suggest just try 4.9-rc1. I think it will not work there probably.

Okay. Let me do a bisect on it. I'll ping back on this thread soon.

Thanks.

- --
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEQCVDstmIVAB/Yn02pjpYo/LhdWkFAlhlSHYACgkQpjpYo/Lh dWnmcg//QrHQozU4PprGVzFWH6aYfCC5fu4Y2nsnxU5ZyHslFchkEzzbf/E6T5y0 fPrdLsSfdnDvD+bZJTq7UsviPj9v4geXm/LuL+zYN75F7alIu4tu93ZXYTf6o8ak XGcpAdXAMw3gtfjzfciMorTX942cMSxAd7uisIM2It9D8efoZ6zNM7Gr9qWz5lbo cPoM3TuJEhfLq3hoAUZftm2nsk8OX/kBifpVgMPU0t/b3DxBYeX0FGbm5dbV40RP /Cm7rcugNnLFVVsveyJYZnSBM7OYZN9t6nTtRSPXDS4OAi4QuFsDnrkokn7f1X4y SzZbzg71WOgqOiOWZY223Q4CmAB+9oFy+IDdsLjDom+TgW79yCHFgthqJEmQhxFJ XY7w4P/zNBZ08m3AgTmxcsFxdYD4MzPCKujg1PEBvn5mEht/ToHS1LnOKsBUVe+d g553BXiC7jFZeRvM156ZLPH/WFqUwHa7NcAuB0Er54kgUEbOCeZWukh9W0bNO/xP u4STPg5NvkXAxqlIGC5mrTie8oJFr8dVAnTQYsaIH+L8DAsepNsFltMyvCKqVVeB DOsp8NISKn3W22HWfBqQDnFwSeI/ZxarzSbI0Ke8qbB/Bd38aGbXcwZ9+mLPBS+M 4+DdgY5oZlN7D96wEEjJPnsMbgsEu143Tf1MydkfyMlFFHayz0s= =HcE8
-----END PGP SIGNATURE-----

#8 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hello Srini,

Quoted 9 lines · Ritesh Raj Sarraf
Quoted 6 lines · Srinivas Pandruvada
Quoted 1 line

If you need more information, please tell me.

I tried on couple of systems with the patch. It seems to fix the issue. It is possible some low level power related changes have impacted this. Can you do bisect? I suggest just try 4.9-rc1. I think it will not work there probably.

Okay. Let me do a bisect on it. I'll ping back on this thread soon.

Since yesterday's attempts, I haven't been able to reproduce the bug again, so far. Apart from re-building the kernel, I have also blacklisted the particular USB device from power savings (based on your hint). I don't know if disabling the power savings for that USB device is the cause for not seeing the issue, but so far, the device seems to report data.

Do you think power savings mode can impact these devices ? I know of USB plugged keyboard/mice to generally break, when enabling power savings mode. But I had hoped that in-built USB devices were immune to it.

Thanks,
Ritesh

- --
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEQCVDstmIVAB/Yn02pjpYo/LhdWkFAlhmOzUACgkQpjpYo/Lh dWndcw/+J2WQhL6BrK1l1o2PraJtEKxnBbonOX7qZJOWnAvwX6/uH95N0u2fv9xU SR4yMLugXM/iKlPpGCk8QmSWuQaJPjCOBole/gq4d4qCoda5z7zqnaSnCUuZgQvO Ffn8uTPmctwtyWHh7NSWNc2yCsWJ4Auv4gRznFfxa27x0VlY9KqGBjz8oM2P0qUf Xr3Da0oxxEdeZykkeyFa2LSESFwXCNf405nL/MuSRzJ49wUeG25ctSyE1HL3RmG/ hVoFmh6XTYiKIXjznH/upqCxvEMI46ObZKHIMJgx71kygx5uqWlS4D0/D5oNL1D5 OsVCuccfxvInRjL93+goCWpFFaD7czzpAdHgBGJArABl3/aG9SdjkDaKdNW6HmyX E0FOQdJEgQ6dAkRcjxuEGqsfLqDNr7DPDJHH4yvoxqHWBS5S35IZisCjaF5h97z3 +qSHm8BUNAYR2LmQ5YwpispzrZGydj6ZEUt4Fhv/Wh2V3uK5fTTTEsSWfFndphsG Ux3gMdREXNPrsj0p+9KDeuv2co+zpXIapLctHvGvsLddDOfj39Q/+KQPS9vsct3F S8L4RrBTnTyyudsWNyPf9SUZmRK8KucbcpRE7gGJDpAHJBf6nmtD0QhB3RIfvYh0 duRGENCF7k2L7de4c9XVS3x5gWLYMV2dIx/aRC1nQsCZRkt0ORs= =wtYI
-----END PGP SIGNATURE-----

#9 lore raw
Quoted 26 lines · Ritesh Raj Sarraf

Hello Srini,

Quoted 5 lines · Ritesh Raj Sarraf
Quoted 3 lines · Srinivas Pandruvada
Quoted 3 lines

If you need more information, please tell me.

Quoted 8 lines
Quoted 7 lines

I tried on couple of systems with the patch. It seems to fix the issue.
It is possible some low level power related changes have impacted this.
Can you do bisect? I suggest just try 4.9-rc1. I think it will not work
there probably.

Okay. Let me do a bisect on it. I'll ping back on this thread soon.

Since yesterday's attempts, I haven't been able to reproduce the bug again, so
far. Apart from re-building the kernel, I have also blacklisted the particular
USB device from power savings (based on your hint). I don't know if disabling
the power savings for that USB device is the cause for not seeing the issue, but
so far, the device seems to report data.

Quoted 6 lines

Do you think power savings mode can impact these devices ? I know of USB plugged
keyboard/mice to generally break, when enabling power savings mode. But I had
hoped that in-built USB devices were immune to it.

This is possible. If your remove from blacklist does it still work? May be rebuild of kernel fixed this:-)

Thanks,
Srinivas

Quoted 3 lines

Thanks,
Ritesh

#10 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Quoted 9 lines · Srinivas Pandruvada
Quoted 6 lines

Do you think power savings mode can impact these devices ? I know of USB plugged
keyboard/mice to generally break, when enabling power savings mode. But I had
hoped that in-built USB devices were immune to it.

This is possible. If your remove from blacklist does it still work? May be rebuild of kernel fixed this:-)

As much as I want to blame it on power savings, that is not the case. Even with power savings enabled, it is all working fine now.

Which means the new kernel build fixed things. Which made me wonder what the difference could be, because I built this new kernel on the same Debian machine, with the same toolchain. And not only did it fix this issue, it has fixed an old annoying USB issue [1] and also many other glitches [2].

While it is nice, if I wanted to pin point any difference, all that I could see is the tool used to build the kernel packages. Earlier, it was through make-kpkg whereas now I am building it with the stock binpkg-deb target.

Other than that, I am out of ideas on why things have improved. Whatever be the case, I'm glad that I don't see those annoying issues anymore. What a way to end the year. Happy New Year, 2017 to all of you.

[1] https://www.spinics.net/lists/linux-usb/msg144634.html
[2] https://www.researchut.com/blog/lenovo-yoga-2-13-debian

- --
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEQCVDstmIVAB/Yn02pjpYo/LhdWkFAlhnqtQACgkQpjpYo/Lh dWk7fRAAtXpXy1DQBvi0x3dCD7QF60kXFBBAShWtMF6Q8aOkmaobjzQsUpDaMAsk vzvEYW951T91NzicSKog+2XW3F08JqpSuggnXrc4+uaegm+TD8qydIkX4ogkCi7m zzTf2UDsV8qacZkqsWfLY01BibLTdo1bwXMxMjym+ufpayk3HJyNXu7Y1hx4vATk Rq8mHVDtD6szdo2fT1My3mfRgQuWlYqvPOylUzSq3+5N1eUyASPAB/bXBEm4Iapp +E+lEqmEraB/MN9wuW6uhWUJfy+oQwwDiGe77V+7pV6eDA0c1NE9BemlL/xEmUZ6 Ma4rRbWDnDPKkW7vv7+kO+hIDZAbHzRWlsvgT/+LNBjKaQnBk81Y4tsZmkkzH7US 5znhpLhL99E1bylubUNRdAvSmGMIINFJjKTNyRQainyhVWJkQ0z7V7fFRsLplHgh mxqlLlulDqPOp7KnT9YyPIMVj57T9KhMFBMaylvYWvbucF2ANsLdL6GydDEBizkz TRc3EuOxvL1xALcq33g2m6BfdRPnjqF6sWdLLW52wxnK/3dH7wIetm87ivz2a9jA QiS4xaVl/etXLoH1lTd9OSeUC+3hLcpjhDJ8g+SiNpIXJ0c/zBOorRDQPZrK7oZ7 2aja7Zs+YZVyx5AuPcm1LsunpNJRs1OzLsXGw2I/9AsnrGrvLFg= =k21y
-----END PGP SIGNATURE-----