linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Atri Bhattacharya <badshah400@aim.com>
To: linux-iio <linux-iio@vger.kernel.org>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Subject: Re: [RFC 0/4] Intel Integrated Sensor Hub Support (ISH)
Date: Thu, 02 Jun 2016 21:42:15 +0200	[thread overview]
Message-ID: <1464896535.3470.4.camel@aim.com> (raw)
In-Reply-To: <1464886187.3970.55.camel@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 3304 bytes --]

Hi Srinivas,

On Thu, 2016-06-02 at 09:49 -0700, Srinivas Pandruvada wrote:
> Hi,
> On Thu, 2016-06-02 at 09:48 +0200, Atri Bhattacharya wrote:
> > On Thu, 2016-06-02 at 03:27 +0000, Srinivas Pandruvada wrote:
> > > 
> > > Atri Bhattacharya <badshah400@...> writes:
> > > 
> > > > 
> > > >  
> [...]
> > > > +
> > >  #include <linux/device.h>
> > >  #include <linux/hid.h>
> > >  #include <linux/module.h>
> > > @@ -798,6 +799,9 @@ static const struct hid_device_id
> > > sensor_hub_devices[] = 
> > > {
> > >         { HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB,
> > > USB_VENDOR_ID_ITE,
> > >                         USB_DEVICE_ID_ITE_LENOVO_YOGA900),
> > >                         .driver_data =
> > > HID_SENSOR_HUB_ENUM_QUIRK},
> > > +       { HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, 
> > > USB_VENDOR_ID_INTEL_0,
> > > +                       0x22D8),
> > > +                       .driver_data =
> > > HID_SENSOR_HUB_ENUM_QUIRK},
> > >         { HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB,
> > > HID_ANY_ID,
> > >                      HID_ANY_ID) },
> > >         { }
> > > 
> > > 
> > Thanks for your response, but this patch didn't help with the slow
> > suspend/wakeup problem or with making the device actually respond
> > to
> > rotation or brightness changes. At this stage the sensor-hub seems
> > to
> > be recognised just fine, but not to be working. Same messages as
> > above
> > continue to show up in the journal.
> > 
> Looks like the system resume is getting timed out. I am looking at
> possible issue on Yoga 260.
> Meanwhile can you try:
> - Raw reads (cat /sys/bus/iio/devices/iio:device (your device
>  index)/in_accel_?_raw

There are two sets of results:

1. After a reboot but before suspend/wakeup

~> for i in {1..5}; do printf "%d " `cat
/sys/bus/iio/devices/iio\:device3/in_accel_?_raw`; echo; sleep 1; done
25684 -1033593 -456933 
-347362 -1014062 -367090 
-919628 -281640 -167871 
-898143 278906 15722 
-648143 683203 123144

2. After susepend/wakeup, output from cat seems to take a long while
(10+ sec for each cat call)

0 0 0
0 0 0 and so on...
 

> - The attached is a program. Don't start iio_sensor_proxy service.
> Disable so that it doesn't start on boot and run
> sensor_monitor -n accel_3d

1. Before suspend/wakeup: see attachment sensor-monitor_output1.txt
2. Post suspend/wakeup: 

/sys/bus/iio/devices/iio:device0 0.000000
>>
>>
>>
>>
>>
>>
>>
>>
>>
l,s,32,32,0
<<
>>
l,s,32,32,0
<<
>>
l,s,32,32,0
<<
/sys/bus/iio/devices/iio:device1 0.000000
>>
>>
>>
>>
>>
>>
>>
>>
>>
l,s,32,32,0
<<
>>
l,s,32,32,0
<<
>>
l,s,32,32,0
<<
/sys/bus/iio/devices/iio:device2 0.001000
>>
>>
>>
>>
>>
l,s,32,32,0
<<
/sys/bus/iio/devices/iio:device3 0.000009
>>
>>
>>
>>
l,s,32,32,0
<<
>>
l,s,32,32,0
<<
>>
l,s,32,32,0
<<
>>
>>
>>
>>
>>
/sys/bus/iio/devices/iio:device4 0.000001
>>
>>
>>
>>
>>
>>
>>
l,s,32,32,0
<<
>>
>>
l,s,32,32,0
<<
>>
l,s,32,32,0
<<
>>
l,s,32,32,0
<<
>>
>>
>>

[It seems to hang at this stage, so I hit Ctrl-C finally after some
waiting]

Hope that helps.
Best wishes.

-- 
Atri Bhattacharya
Thu  2 Jun 21:39:25 CEST 2016

Sent from openSUSE Tumbleweed (20160531) (x86_64) on my laptop.

[-- Attachment #2: sensor-monitor_ouput1.txt --]
[-- Type: text/plain, Size: 2777 bytes --]

/sys/bus/iio/devices/iio:device0 0.000000
>>
>>
>>
>>
>>
>>
>>
>>
>>
l,s,32,32,0
<<
>>
l,s,32,32,0
<<
>>
l,s,32,32,0
<<
/sys/bus/iio/devices/iio:device1 0.000000
>>
>>
>>
>>
>>
>>
>>
>>
>>
l,s,32,32,0
<<
>>
l,s,32,32,0
<<
>>
l,s,32,32,0
<<
/sys/bus/iio/devices/iio:device2 0.001000
>>
>>
>>
>>
>>
l,s,32,32,0
<<
/sys/bus/iio/devices/iio:device3 0.000009
>>
>>
>>
>>
l,s,32,32,0
<<
>>
l,s,32,32,0
<<
>>
l,s,32,32,0
<<
>>
>>
>>
>>
>>
/sys/bus/iio/devices/iio:device4 0.000001
>>
>>
>>
>>
>>
>>
>>
l,s,32,32,0
<<
>>
>>
l,s,32,32,0
<<
>>
l,s,32,32,0
<<
>>
l,s,32,32,0
<<
>>
>>
>>
Read bufsize 12
fread ret = 1
Event (      0.25,     -6.95,     -5.85)
Read bufsize 12
fread ret = 1
Event (     -0.09,     -6.67,     -5.36)
Read bufsize 12
fread ret = 1
Event (      0.21,     -6.82,     -5.87)
Read bufsize 12
fread ret = 1
Event (      0.14,     -6.74,     -5.71)
Read bufsize 12
fread ret = 1
Event (      0.16,     -6.81,     -5.84)
Read bufsize 12
fread ret = 1
Event (      0.13,     -6.77,     -5.76)
Read bufsize 12
fread ret = 1
Event (      0.16,     -6.79,     -5.80)
Read bufsize 12
fread ret = 1
Event (      0.16,     -6.81,     -5.80)
Read bufsize 12
fread ret = 1
Event (      0.18,     -6.75,     -5.80)
Read bufsize 12
fread ret = 1
Event (      0.14,     -6.77,     -5.78)
Read bufsize 12
fread ret = 1
Event (      0.18,     -6.75,     -5.84)
Read bufsize 12
fread ret = 1
Event (      0.18,     -6.79,     -5.80)
Read bufsize 12
fread ret = 1
Event (      0.16,     -6.82,     -5.75)
Read bufsize 12
fread ret = 1
Event (      0.16,     -6.81,     -5.73)
Read bufsize 12
fread ret = 1
Event (      0.16,     -6.77,     -5.75)
Read bufsize 12
fread ret = 1
Event (      0.18,     -6.79,     -5.78)
Read bufsize 12
fread ret = 1
Event (      0.18,     -6.79,     -5.76)
Read bufsize 12
fread ret = 1
Event (      0.23,     -6.81,     -5.91)
Read bufsize 12
fread ret = 1
Event (      0.16,     -6.82,     -5.69)
Read bufsize 12
fread ret = 1
Event (      0.13,     -6.77,     -5.73)
Read bufsize 12
fread ret = 1
Event (      0.20,     -6.79,     -5.75)
Read bufsize 12
fread ret = 1
Event (      0.20,     -6.79,     -5.82)
Read bufsize 12
fread ret = 1
Event (      0.20,     -6.77,     -6.17)
Read bufsize 12
fread ret = 1
Event (      0.16,     -6.79,     -5.82)
Read bufsize 12
fread ret = 1
Event (      0.14,     -6.82,     -5.73)
Read bufsize 12
fread ret = 1
Event (      0.09,     -6.77,     -5.76)
Read bufsize 12
fread ret = 1
Event (      0.13,     -6.79,     -5.73)
Read bufsize 12
fread ret = 1
Event (      0.11,     -6.77,     -5.75)
Read bufsize 12
fread ret = 1
Event (      0.14,     -6.81,     -5.75)
Read bufsize 12
fread ret = 1
Event (      0.14,     -6.81,     -5.76)
Read bufsize 12
fread ret = 1
Event (      0.21,     -6.82,     -5.87)

  reply	other threads:[~2016-06-02 19:42 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-31  4:27 [RFC 0/4] Intel Integrated Sensor Hub Support (ISH) Srinivas Pandruvada
2016-05-31  4:27 ` [RFC 1/4] Documentation: hid: Intel ISH HID document Srinivas Pandruvada
2016-05-31  4:27 ` [RFC 2/4] hid: intel_ish-hid: ISH Transport layer Srinivas Pandruvada
2016-05-31  4:27 ` [RFC 3/4] hid: intel-ish-hid: ipc layer Srinivas Pandruvada
2016-05-31  4:27 ` [RFC 4/4] hid: intel-ish-hid: ISH HID client driver Srinivas Pandruvada
2016-06-01 13:36 ` [RFC 0/4] Intel Integrated Sensor Hub Support (ISH) Atri Bhattacharya
2016-06-02  3:27   ` Srinivas Pandruvada
2016-06-02  7:48     ` Atri Bhattacharya
2016-06-02 16:49       ` Srinivas Pandruvada
2016-06-02 19:42         ` Atri Bhattacharya [this message]
2016-06-02 20:00           ` Srinivas Pandruvada
2016-06-02 21:44             ` Pandruvada, Srinivas
2016-06-02 22:29               ` Atri Bhattacharya
2016-06-02 22:48                 ` Srinivas Pandruvada
2016-06-02 22:57                   ` Atri Bhattacharya
2016-06-02 23:13                     ` Atri Bhattacharya
2016-06-03  2:50                   ` Atri Bhattacharya
2016-06-03  4:01                     ` Srinivas Pandruvada
2016-06-03  3:08             ` Atri Bhattacharya
2016-06-03  4:02               ` Srinivas Pandruvada
2016-06-06  6:47               ` Srinivas Pandruvada
2016-06-09 21:45 ` Grant Likely
2016-06-09 21:54   ` Srinivas Pandruvada
2016-06-10  9:44     ` Grant Likely
2016-06-10 13:55       ` Srinivas Pandruvada
2016-06-10 14:26         ` Bastien Nocera
2016-06-10 14:45           ` Srinivas Pandruvada
2016-06-10 15:04             ` Bastien Nocera
2016-06-10 15:23               ` Srinivas Pandruvada
2016-06-10 15:27                 ` Bastien Nocera
2016-06-14 13:44                   ` Grant Likely
2016-06-14 15:12                     ` Bastien Nocera
2016-06-14 16:08                       ` Grant Likely
2016-06-14 17:01                         ` Bastien Nocera
2016-06-14 21:33                           ` Grant Likely
2016-06-10 14:02       ` Grant Likely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1464896535.3470.4.camel@aim.com \
    --to=badshah400@aim.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=srinivas.pandruvada@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).