Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1418803 > unrolled thread

Re: [RFC 0/4] Intel Integrated Sensor Hub Support (ISH)

Started byGrant Likely <grant.likely@secretlab.ca>
First post2016-06-09 23:50 +0200
Last post2016-06-10 16:10 +0200
Articles 10 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [RFC 0/4] Intel Integrated Sensor Hub Support (ISH) Grant Likely <grant.likely@secretlab.ca> - 2016-06-09 23:50 +0200
    Re: [RFC 0/4] Intel Integrated Sensor Hub Support (ISH) Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> - 2016-06-10 00:00 +0200
      Re: [RFC 0/4] Intel Integrated Sensor Hub Support (ISH) Grant Likely <grant.likely@secretlab.ca> - 2016-06-10 11:50 +0200
        Re: [RFC 0/4] Intel Integrated Sensor Hub Support (ISH) Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> - 2016-06-10 16:00 +0200
          Re: [RFC 0/4] Intel Integrated Sensor Hub Support (ISH) Bastien Nocera <hadess@hadess.net> - 2016-06-10 16:30 +0200
            Re: [RFC 0/4] Intel Integrated Sensor Hub Support (ISH) Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> - 2016-06-10 16:50 +0200
              Re: [RFC 0/4] Intel Integrated Sensor Hub Support (ISH) Bastien Nocera <hadess@hadess.net> - 2016-06-10 17:10 +0200
                Re: [RFC 0/4] Intel Integrated Sensor Hub Support (ISH) Bastien Nocera <hadess@hadess.net> - 2016-06-10 17:30 +0200
                Re: [RFC 0/4] Intel Integrated Sensor Hub Support (ISH) Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> - 2016-06-10 17:30 +0200
        Re: [RFC 0/4] Intel Integrated Sensor Hub Support (ISH) Grant Likely <grant.likely@secretlab.ca> - 2016-06-10 16:10 +0200

#1418803 — Re: [RFC 0/4] Intel Integrated Sensor Hub Support (ISH)

FromGrant Likely <grant.likely@secretlab.ca>
Date2016-06-09 23:50 +0200
SubjectRe: [RFC 0/4] Intel Integrated Sensor Hub Support (ISH)
Message-ID<rIfZV-3GB-67@gated-at.bofh.it>
On Tue, May 31, 2016 at 5:27 AM, Srinivas Pandruvada
<srinivas.pandruvada@linux.intel.com> wrote:
> Starting from Cherrytrail, multiple generation of Intel processors offers
> on package sensor hub. Several recent tablets, 2-in-1 convertible laptops
> are using ISH instead of external sensor hubs. This resulted in lack of
> support of sensor function like device rotation and auto backlight
> adjustment. In addition, depending on the OEM implementation, support of ISH
> is required to support low power sleep states.
>
> The support of ISH on Linux platforms is not new. Android platforms with
> Intel SoCs had this support for a while submitted by Daniel Drubin.
> This patcheset is reusing most of those changes with  clean up and
> removing Android platform specific changes.

Hi Srinivas,

Thanks for this patch series. I've got an HP Spectre x360 G2
(skylake), and I've built a 4.6.0 kernel with this driver patched in.
It detects the sensors hub, and creates IIO devices under
/sys/bus/iio/devices:

$ ls /sys/bus/iio/devices/
iio:device0  iio:device1  iio:device2  iio:device3  iio:device4
iio:device5  iio:device6  iio:device7  iio:device8  iio:device9
trigger0  trigger1  trigger2  trigger3  trigger4  trigger5  trigger6
trigger7  trigger8  trigger9

However, I haven't figured out how to test it yet. (This is the first
time I'm working with IIO). Do you have any test code or test
procedures to show if it is working?

Thanks,
g.

>
> This series is tested on:
> - Lenovo Yoga 260 with Skylake processor
> - HP Pavilion x2 detachable with Cherrytrail
>
> The user mode ABI is still same as external sensor hubs using Linux
> IIO. So existing user mode software should still work without change.
> This series primarily brings in new HID transport used in ISH.
>
> This series submitted as a RFC to try on several devices. We have
> received request from Linux users who wanted this support. So I hope all
> those users try and give feedback.
>
> Daniel Drubin (3):
>   hid: intel_ish-hid: ISH Transport layer
>   hid: intel-ish-hid: ipc layer
>   hid: intel-ish-hid: ISH HID client driver
>
> Srinivas Pandruvada (1):
>   Documentation: hid: Intel ISH HID document
>
>  Documentation/hid/intel-ish-hid.txt          |  375 +++++++++
>  drivers/hid/Kconfig                          |    2 +
>  drivers/hid/Makefile                         |    2 +
>  drivers/hid/intel-ish-hid/Kconfig            |   27 +
>  drivers/hid/intel-ish-hid/Makefile           |   20 +
>  drivers/hid/intel-ish-hid/ipc/hw-ish-regs.h  |  220 +++++
>  drivers/hid/intel-ish-hid/ipc/hw-ish.h       |   71 ++
>  drivers/hid/intel-ish-hid/ipc/ipc.c          |  710 ++++++++++++++++
>  drivers/hid/intel-ish-hid/ipc/pci-ish.c      |  238 ++++++
>  drivers/hid/intel-ish-hid/ipc/utils.h        |   65 ++
>  drivers/hid/intel-ish-hid/ishtp-hid-client.c |  672 +++++++++++++++
>  drivers/hid/intel-ish-hid/ishtp-hid.c        |  201 +++++
>  drivers/hid/intel-ish-hid/ishtp-hid.h        |  157 ++++
>  drivers/hid/intel-ish-hid/ishtp/bus.c        |  670 +++++++++++++++
>  drivers/hid/intel-ish-hid/ishtp/bus.h        |   99 +++
>  drivers/hid/intel-ish-hid/ishtp/client.c     | 1131 ++++++++++++++++++++++++++
>  drivers/hid/intel-ish-hid/ishtp/client.h     |  196 +++++
>  drivers/hid/intel-ish-hid/ishtp/dma-if.c     |  175 ++++
>  drivers/hid/intel-ish-hid/ishtp/hbm.c        |  911 +++++++++++++++++++++
>  drivers/hid/intel-ish-hid/ishtp/hbm.h        |  319 ++++++++
>  drivers/hid/intel-ish-hid/ishtp/init.c       |   94 +++
>  drivers/hid/intel-ish-hid/ishtp/ishtp-dev.h  |  276 +++++++
>  include/trace/events/intel_ish.h             |   30 +
>  23 files changed, 6661 insertions(+)
>  create mode 100644 Documentation/hid/intel-ish-hid.txt
>  create mode 100644 drivers/hid/intel-ish-hid/Kconfig
>  create mode 100644 drivers/hid/intel-ish-hid/Makefile
>  create mode 100644 drivers/hid/intel-ish-hid/ipc/hw-ish-regs.h
>  create mode 100644 drivers/hid/intel-ish-hid/ipc/hw-ish.h
>  create mode 100644 drivers/hid/intel-ish-hid/ipc/ipc.c
>  create mode 100644 drivers/hid/intel-ish-hid/ipc/pci-ish.c
>  create mode 100644 drivers/hid/intel-ish-hid/ipc/utils.h
>  create mode 100644 drivers/hid/intel-ish-hid/ishtp-hid-client.c
>  create mode 100644 drivers/hid/intel-ish-hid/ishtp-hid.c
>  create mode 100644 drivers/hid/intel-ish-hid/ishtp-hid.h
>  create mode 100644 drivers/hid/intel-ish-hid/ishtp/bus.c
>  create mode 100644 drivers/hid/intel-ish-hid/ishtp/bus.h
>  create mode 100644 drivers/hid/intel-ish-hid/ishtp/client.c
>  create mode 100644 drivers/hid/intel-ish-hid/ishtp/client.h
>  create mode 100644 drivers/hid/intel-ish-hid/ishtp/dma-if.c
>  create mode 100644 drivers/hid/intel-ish-hid/ishtp/hbm.c
>  create mode 100644 drivers/hid/intel-ish-hid/ishtp/hbm.h
>  create mode 100644 drivers/hid/intel-ish-hid/ishtp/init.c
>  create mode 100644 drivers/hid/intel-ish-hid/ishtp/ishtp-dev.h
>  create mode 100644 include/trace/events/intel_ish.h
>
> --
> 1.9.1
>

[toc] | [next] | [standalone]


#1418836

FromSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date2016-06-10 00:00 +0200
Message-ID<rIg9B-3KD-61@gated-at.bofh.it>
In reply to#1418803
Hi,
On Thu, 2016-06-09 at 22:45 +0100, Grant Likely wrote:
> On Tue, May 31, 2016 at 5:27 AM, Srinivas Pandruvada
> <srinivas.pandruvada@linux.intel.com> wrote:
> > 
> > Starting from Cherrytrail, multiple generation of Intel processors
> > offers
> > on package sensor hub. Several recent tablets, 2-in-1 convertible
> > laptops
> > are using ISH instead of external sensor hubs. This resulted in
> > lack of
> > support of sensor function like device rotation and auto backlight
> > adjustment. In addition, depending on the OEM implementation,
> > support of ISH
> > is required to support low power sleep states.
> > 
> > The support of ISH on Linux platforms is not new. Android platforms
> > with
> > Intel SoCs had this support for a while submitted by Daniel Drubin.
> > This patcheset is reusing most of those changes with  clean up and
> > removing Android platform specific changes.
> Hi Srinivas,
> 
> Thanks for this patch series. I've got an HP Spectre x360 G2
> (skylake), and I've built a 4.6.0 kernel with this driver patched in.
> It detects the sensors hub, and creates IIO devices under
> /sys/bus/iio/devices:
> 
> $ ls /sys/bus/iio/devices/
> iio:device0  iio:device1  iio:device2  iio:device3  iio:device4
> iio:device5  iio:device6  iio:device7  iio:device8  iio:device9
> trigger0  trigger1  trigger2  trigger3  trigger4  trigger5  trigger6
> trigger7  trigger8  trigger9
> 
> However, I haven't figured out how to test it yet. (This is the first
> time I'm working with IIO). Do you have any test code or test
> procedures to show if it is working?
> 
If you use Fedora 23 (or any distro with iio-sensor-proxy with gnome
rotation stuff), you should be able to do screen rotation and
brightness using ALS.
Each of these folders should have some raw sysfs files 
in_xxx_raw_xx

You should be able to use "cat" on them.

Thanks,
Srinivas


> Thanks,
> g.
> 
> > 
> > 
> > This series is tested on:
> > - Lenovo Yoga 260 with Skylake processor
> > - HP Pavilion x2 detachable with Cherrytrail
> > 
> > The user mode ABI is still same as external sensor hubs using Linux
> > IIO. So existing user mode software should still work without
> > change.
> > This series primarily brings in new HID transport used in ISH.
> > 
> > This series submitted as a RFC to try on several devices. We have
> > received request from Linux users who wanted this support. So I
> > hope all
> > those users try and give feedback.
> > 
> > Daniel Drubin (3):
> >   hid: intel_ish-hid: ISH Transport layer
> >   hid: intel-ish-hid: ipc layer
> >   hid: intel-ish-hid: ISH HID client driver
> > 
> > Srinivas Pandruvada (1):
> >   Documentation: hid: Intel ISH HID document
> > 
> >  Documentation/hid/intel-ish-hid.txt          |  375 +++++++++
> >  drivers/hid/Kconfig                          |    2 +
> >  drivers/hid/Makefile                         |    2 +
> >  drivers/hid/intel-ish-hid/Kconfig            |   27 +
> >  drivers/hid/intel-ish-hid/Makefile           |   20 +
> >  drivers/hid/intel-ish-hid/ipc/hw-ish-regs.h  |  220 +++++
> >  drivers/hid/intel-ish-hid/ipc/hw-ish.h       |   71 ++
> >  drivers/hid/intel-ish-hid/ipc/ipc.c          |  710
> > ++++++++++++++++
> >  drivers/hid/intel-ish-hid/ipc/pci-ish.c      |  238 ++++++
> >  drivers/hid/intel-ish-hid/ipc/utils.h        |   65 ++
> >  drivers/hid/intel-ish-hid/ishtp-hid-client.c |  672
> > +++++++++++++++
> >  drivers/hid/intel-ish-hid/ishtp-hid.c        |  201 +++++
> >  drivers/hid/intel-ish-hid/ishtp-hid.h        |  157 ++++
> >  drivers/hid/intel-ish-hid/ishtp/bus.c        |  670
> > +++++++++++++++
> >  drivers/hid/intel-ish-hid/ishtp/bus.h        |   99 +++
> >  drivers/hid/intel-ish-hid/ishtp/client.c     | 1131
> > ++++++++++++++++++++++++++
> >  drivers/hid/intel-ish-hid/ishtp/client.h     |  196 +++++
> >  drivers/hid/intel-ish-hid/ishtp/dma-if.c     |  175 ++++
> >  drivers/hid/intel-ish-hid/ishtp/hbm.c        |  911
> > +++++++++++++++++++++
> >  drivers/hid/intel-ish-hid/ishtp/hbm.h        |  319 ++++++++
> >  drivers/hid/intel-ish-hid/ishtp/init.c       |   94 +++
> >  drivers/hid/intel-ish-hid/ishtp/ishtp-dev.h  |  276 +++++++
> >  include/trace/events/intel_ish.h             |   30 +
> >  23 files changed, 6661 insertions(+)
> >  create mode 100644 Documentation/hid/intel-ish-hid.txt
> >  create mode 100644 drivers/hid/intel-ish-hid/Kconfig
> >  create mode 100644 drivers/hid/intel-ish-hid/Makefile
> >  create mode 100644 drivers/hid/intel-ish-hid/ipc/hw-ish-regs.h
> >  create mode 100644 drivers/hid/intel-ish-hid/ipc/hw-ish.h
> >  create mode 100644 drivers/hid/intel-ish-hid/ipc/ipc.c
> >  create mode 100644 drivers/hid/intel-ish-hid/ipc/pci-ish.c
> >  create mode 100644 drivers/hid/intel-ish-hid/ipc/utils.h
> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp-hid-client.c
> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp-hid.c
> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp-hid.h
> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/bus.c
> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/bus.h
> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/client.c
> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/client.h
> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/dma-if.c
> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/hbm.c
> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/hbm.h
> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/init.c
> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/ishtp-dev.h
> >  create mode 100644 include/trace/events/intel_ish.h
> > 
> > --
> > 1.9.1
> > 

[toc] | [prev] | [next] | [standalone]


#1419173

FromGrant Likely <grant.likely@secretlab.ca>
Date2016-06-10 11:50 +0200
Message-ID<rIreG-2SG-25@gated-at.bofh.it>
In reply to#1418836
On Thu, Jun 9, 2016 at 10:54 PM, Srinivas Pandruvada
<srinivas.pandruvada@linux.intel.com> wrote:
> Hi,
> On Thu, 2016-06-09 at 22:45 +0100, Grant Likely wrote:
>> On Tue, May 31, 2016 at 5:27 AM, Srinivas Pandruvada
>> <srinivas.pandruvada@linux.intel.com> wrote:
>> >
>> > Starting from Cherrytrail, multiple generation of Intel processors
>> > offers
>> > on package sensor hub. Several recent tablets, 2-in-1 convertible
>> > laptops
>> > are using ISH instead of external sensor hubs. This resulted in
>> > lack of
>> > support of sensor function like device rotation and auto backlight
>> > adjustment. In addition, depending on the OEM implementation,
>> > support of ISH
>> > is required to support low power sleep states.
>> >
>> > The support of ISH on Linux platforms is not new. Android platforms
>> > with
>> > Intel SoCs had this support for a while submitted by Daniel Drubin.
>> > This patcheset is reusing most of those changes with  clean up and
>> > removing Android platform specific changes.
>> Hi Srinivas,
>>
>> Thanks for this patch series. I've got an HP Spectre x360 G2
>> (skylake), and I've built a 4.6.0 kernel with this driver patched in.
>> It detects the sensors hub, and creates IIO devices under
>> /sys/bus/iio/devices:
>>
>> $ ls /sys/bus/iio/devices/
>> iio:device0  iio:device1  iio:device2  iio:device3  iio:device4
>> iio:device5  iio:device6  iio:device7  iio:device8  iio:device9
>> trigger0  trigger1  trigger2  trigger3  trigger4  trigger5  trigger6
>> trigger7  trigger8  trigger9
>>
>> However, I haven't figured out how to test it yet. (This is the first
>> time I'm working with IIO). Do you have any test code or test
>> procedures to show if it is working?
>>
> If you use Fedora 23 (or any distro with iio-sensor-proxy with gnome
> rotation stuff), you should be able to do screen rotation and
> brightness using ALS.
> Each of these folders should have some raw sysfs files
> in_xxx_raw_xx
>
> You should be able to use "cat" on them.

Yes, I do see the in_*_raw_* files in sysfs, and I'm able to get data
out of them. Gnome also seems to recognize that the accelerometers are
there because it adds a rotation lock button to the system menu.

However, the events are getting through yet. It may be that I'm
missing something in my kernel config. I'm rebuilding the kernel with
Debian's config for the 4.5.5 kernel as a quick sanity test. I'll
report back when I've tried.

I'll also take some time and review the patch series later this afternoon.

g.

>
> Thanks,
> Srinivas
>
>
>> Thanks,
>> g.
>>
>> >
>> >
>> > This series is tested on:
>> > - Lenovo Yoga 260 with Skylake processor
>> > - HP Pavilion x2 detachable with Cherrytrail
>> >
>> > The user mode ABI is still same as external sensor hubs using Linux
>> > IIO. So existing user mode software should still work without
>> > change.
>> > This series primarily brings in new HID transport used in ISH.
>> >
>> > This series submitted as a RFC to try on several devices. We have
>> > received request from Linux users who wanted this support. So I
>> > hope all
>> > those users try and give feedback.
>> >
>> > Daniel Drubin (3):
>> >   hid: intel_ish-hid: ISH Transport layer
>> >   hid: intel-ish-hid: ipc layer
>> >   hid: intel-ish-hid: ISH HID client driver
>> >
>> > Srinivas Pandruvada (1):
>> >   Documentation: hid: Intel ISH HID document
>> >
>> >  Documentation/hid/intel-ish-hid.txt          |  375 +++++++++
>> >  drivers/hid/Kconfig                          |    2 +
>> >  drivers/hid/Makefile                         |    2 +
>> >  drivers/hid/intel-ish-hid/Kconfig            |   27 +
>> >  drivers/hid/intel-ish-hid/Makefile           |   20 +
>> >  drivers/hid/intel-ish-hid/ipc/hw-ish-regs.h  |  220 +++++
>> >  drivers/hid/intel-ish-hid/ipc/hw-ish.h       |   71 ++
>> >  drivers/hid/intel-ish-hid/ipc/ipc.c          |  710
>> > ++++++++++++++++
>> >  drivers/hid/intel-ish-hid/ipc/pci-ish.c      |  238 ++++++
>> >  drivers/hid/intel-ish-hid/ipc/utils.h        |   65 ++
>> >  drivers/hid/intel-ish-hid/ishtp-hid-client.c |  672
>> > +++++++++++++++
>> >  drivers/hid/intel-ish-hid/ishtp-hid.c        |  201 +++++
>> >  drivers/hid/intel-ish-hid/ishtp-hid.h        |  157 ++++
>> >  drivers/hid/intel-ish-hid/ishtp/bus.c        |  670
>> > +++++++++++++++
>> >  drivers/hid/intel-ish-hid/ishtp/bus.h        |   99 +++
>> >  drivers/hid/intel-ish-hid/ishtp/client.c     | 1131
>> > ++++++++++++++++++++++++++
>> >  drivers/hid/intel-ish-hid/ishtp/client.h     |  196 +++++
>> >  drivers/hid/intel-ish-hid/ishtp/dma-if.c     |  175 ++++
>> >  drivers/hid/intel-ish-hid/ishtp/hbm.c        |  911
>> > +++++++++++++++++++++
>> >  drivers/hid/intel-ish-hid/ishtp/hbm.h        |  319 ++++++++
>> >  drivers/hid/intel-ish-hid/ishtp/init.c       |   94 +++
>> >  drivers/hid/intel-ish-hid/ishtp/ishtp-dev.h  |  276 +++++++
>> >  include/trace/events/intel_ish.h             |   30 +
>> >  23 files changed, 6661 insertions(+)
>> >  create mode 100644 Documentation/hid/intel-ish-hid.txt
>> >  create mode 100644 drivers/hid/intel-ish-hid/Kconfig
>> >  create mode 100644 drivers/hid/intel-ish-hid/Makefile
>> >  create mode 100644 drivers/hid/intel-ish-hid/ipc/hw-ish-regs.h
>> >  create mode 100644 drivers/hid/intel-ish-hid/ipc/hw-ish.h
>> >  create mode 100644 drivers/hid/intel-ish-hid/ipc/ipc.c
>> >  create mode 100644 drivers/hid/intel-ish-hid/ipc/pci-ish.c
>> >  create mode 100644 drivers/hid/intel-ish-hid/ipc/utils.h
>> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp-hid-client.c
>> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp-hid.c
>> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp-hid.h
>> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/bus.c
>> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/bus.h
>> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/client.c
>> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/client.h
>> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/dma-if.c
>> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/hbm.c
>> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/hbm.h
>> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/init.c
>> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/ishtp-dev.h
>> >  create mode 100644 include/trace/events/intel_ish.h
>> >
>> > --
>> > 1.9.1
>> >

[toc] | [prev] | [next] | [standalone]


#1419443

FromSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date2016-06-10 16:00 +0200
Message-ID<rIv8C-5fJ-27@gated-at.bofh.it>
In reply to#1419173
On Fri, 2016-06-10 at 10:44 +0100, Grant Likely wrote:
[...]
> 
> Yes, I do see the in_*_raw_* files in sysfs, and I'm able to get data
> out of them. Gnome also seems to recognize that the accelerometers
> are
> there because it adds a rotation lock button to the system menu.
> 
> However, the events are getting through yet. It may be that I'm
> missing something in my kernel config. I'm rebuilding the kernel with
> Debian's config for the 4.5.5 kernel as a quick sanity test. I'll
> report back when I've tried.
> 
You need to add in /usr/lib/system/systemd/iio-sensor-*

After=multi-user.target


This service starts too early.

> I'll also take some time and review the patch series later this
> afternoon.

Atri Bhattacharya reported issues with suspend/resume. With my test
patches it is fixed for him

If you want to hold on, I will repost with fixes for susend/resume.

Thanks,
Srinivas

> 

> g.
> 
> > 
> > Thanks,
> > Srinivas
> > 
> > 
> > > Thanks,
> > > g.
> > > 
> > > > 
> > > > 
> > > > This series is tested on:
> > > > - Lenovo Yoga 260 with Skylake processor
> > > > - HP Pavilion x2 detachable with Cherrytrail
> > > > 
> > > > The user mode ABI is still same as external sensor hubs using
> > > > Linux
> > > > IIO. So existing user mode software should still work without
> > > > change.
> > > > This series primarily brings in new HID transport used in ISH.
> > > > 
> > > > This series submitted as a RFC to try on several devices. We
> > > > have
> > > > received request from Linux users who wanted this support. So I
> > > > hope all
> > > > those users try and give feedback.
> > > > 
> > > > Daniel Drubin (3):
> > > >   hid: intel_ish-hid: ISH Transport layer
> > > >   hid: intel-ish-hid: ipc layer
> > > >   hid: intel-ish-hid: ISH HID client driver
> > > > 
> > > > Srinivas Pandruvada (1):
> > > >   Documentation: hid: Intel ISH HID document
> > > > 
> > > >  Documentation/hid/intel-ish-hid.txt          |  375 +++++++++
> > > >  drivers/hid/Kconfig                          |    2 +
> > > >  drivers/hid/Makefile                         |    2 +
> > > >  drivers/hid/intel-ish-hid/Kconfig            |   27 +
> > > >  drivers/hid/intel-ish-hid/Makefile           |   20 +
> > > >  drivers/hid/intel-ish-hid/ipc/hw-ish-regs.h  |  220 +++++
> > > >  drivers/hid/intel-ish-hid/ipc/hw-ish.h       |   71 ++
> > > >  drivers/hid/intel-ish-hid/ipc/ipc.c          |  710
> > > > ++++++++++++++++
> > > >  drivers/hid/intel-ish-hid/ipc/pci-ish.c      |  238 ++++++
> > > >  drivers/hid/intel-ish-hid/ipc/utils.h        |   65 ++
> > > >  drivers/hid/intel-ish-hid/ishtp-hid-client.c |  672
> > > > +++++++++++++++
> > > >  drivers/hid/intel-ish-hid/ishtp-hid.c        |  201 +++++
> > > >  drivers/hid/intel-ish-hid/ishtp-hid.h        |  157 ++++
> > > >  drivers/hid/intel-ish-hid/ishtp/bus.c        |  670
> > > > +++++++++++++++
> > > >  drivers/hid/intel-ish-hid/ishtp/bus.h        |   99 +++
> > > >  drivers/hid/intel-ish-hid/ishtp/client.c     | 1131
> > > > ++++++++++++++++++++++++++
> > > >  drivers/hid/intel-ish-hid/ishtp/client.h     |  196 +++++
> > > >  drivers/hid/intel-ish-hid/ishtp/dma-if.c     |  175 ++++
> > > >  drivers/hid/intel-ish-hid/ishtp/hbm.c        |  911
> > > > +++++++++++++++++++++
> > > >  drivers/hid/intel-ish-hid/ishtp/hbm.h        |  319 ++++++++
> > > >  drivers/hid/intel-ish-hid/ishtp/init.c       |   94 +++
> > > >  drivers/hid/intel-ish-hid/ishtp/ishtp-dev.h  |  276 +++++++
> > > >  include/trace/events/intel_ish.h             |   30 +
> > > >  23 files changed, 6661 insertions(+)
> > > >  create mode 100644 Documentation/hid/intel-ish-hid.txt
> > > >  create mode 100644 drivers/hid/intel-ish-hid/Kconfig
> > > >  create mode 100644 drivers/hid/intel-ish-hid/Makefile
> > > >  create mode 100644 drivers/hid/intel-ish-hid/ipc/hw-ish-regs.h
> > > >  create mode 100644 drivers/hid/intel-ish-hid/ipc/hw-ish.h
> > > >  create mode 100644 drivers/hid/intel-ish-hid/ipc/ipc.c
> > > >  create mode 100644 drivers/hid/intel-ish-hid/ipc/pci-ish.c
> > > >  create mode 100644 drivers/hid/intel-ish-hid/ipc/utils.h
> > > >  create mode 100644 drivers/hid/intel-ish-hid/ishtp-hid-
> > > > client.c
> > > >  create mode 100644 drivers/hid/intel-ish-hid/ishtp-hid.c
> > > >  create mode 100644 drivers/hid/intel-ish-hid/ishtp-hid.h
> > > >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/bus.c
> > > >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/bus.h
> > > >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/client.c
> > > >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/client.h
> > > >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/dma-if.c
> > > >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/hbm.c
> > > >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/hbm.h
> > > >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/init.c
> > > >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/ishtp-dev.h
> > > >  create mode 100644 include/trace/events/intel_ish.h
> > > > 
> > > > --
> > > > 1.9.1
> > > > 

[toc] | [prev] | [next] | [standalone]


#1419472

FromBastien Nocera <hadess@hadess.net>
Date2016-06-10 16:30 +0200
Message-ID<rIvBD-5Ff-7@gated-at.bofh.it>
In reply to#1419443
On Fri, 2016-06-10 at 06:55 -0700, Srinivas Pandruvada wrote:
> On Fri, 2016-06-10 at 10:44 +0100, Grant Likely wrote:
> [...]
> > 
> > Yes, I do see the in_*_raw_* files in sysfs, and I'm able to get
> > data
> > out of them. Gnome also seems to recognize that the accelerometers
> > are
> > there because it adds a rotation lock button to the system menu.
> > 
> > However, the events are getting through yet. It may be that I'm
> > missing something in my kernel config. I'm rebuilding the kernel
> > with
> > Debian's config for the 4.5.5 kernel as a quick sanity test. I'll
> > report back when I've tried.
> > 
> You need to add in /usr/lib/system/systemd/iio-sensor-*
> 
> After=multi-user.target
> 
> 
> This service starts too early.

Nobody has been able to explain to me why that would be a problem.

Can you back this up with some data? Does iio-sensor-proxy exit too
early? Does that leave time to the IIO sub-system to do some init work
it should already have done?

See also https://github.com/hadess/iio-sensor-proxy/issues/82

> > I'll also take some time and review the patch series later this
> > afternoon.
> 
> Atri Bhattacharya reported issues with suspend/resume. With my test
> patches it is fixed for him
> 
> If you want to hold on, I will repost with fixes for susend/resume.

[toc] | [prev] | [next] | [standalone]


#1419488

FromSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date2016-06-10 16:50 +0200
Message-ID<rIvUZ-5O9-1@gated-at.bofh.it>
In reply to#1419472
On Fri, 2016-06-10 at 16:26 +0200, Bastien Nocera wrote:
> On Fri, 2016-06-10 at 06:55 -0700, Srinivas Pandruvada wrote:
> > On Fri, 2016-06-10 at 10:44 +0100, Grant Likely wrote:
> > [...]
> > > 
> > > Yes, I do see the in_*_raw_* files in sysfs, and I'm able to get
> > > data
> > > out of them. Gnome also seems to recognize that the
> > > accelerometers
> > > are
> > > there because it adds a rotation lock button to the system menu.
> > > 
> > > However, the events are getting through yet. It may be that I'm
> > > missing something in my kernel config. I'm rebuilding the kernel
> > > with
> > > Debian's config for the 4.5.5 kernel as a quick sanity test. I'll
> > > report back when I've tried.
> > > 
> > You need to add in /usr/lib/system/systemd/iio-sensor-*
> > 
> > After=multi-user.target
> > 
> > 
> > This service starts too early.
> 
> Nobody has been able to explain to me why that would be a problem.
> 
> Can you back this up with some data? Does iio-sensor-proxy exit too
> early? Does that leave time to the IIO sub-system to do some init
> work
> it should already have done?
The driver's  trigger callback doesn't even get called to take any
action or provide any data. So to get called need to restart the
service or do suspend/resume.
After=multi-user.target, is not the ideal solution as it is too late.
So need further debug.

> 
> See also https://github.com/hadess/iio-sensor-proxy/issues/82
> 
> > > I'll also take some time and review the patch series later this
> > > afternoon.
> > 
> > Atri Bhattacharya reported issues with suspend/resume. With my test
> > patches it is fixed for him
> > 
> > If you want to hold on, I will repost with fixes for susend/resume.
> 

[toc] | [prev] | [next] | [standalone]


#1419505

FromBastien Nocera <hadess@hadess.net>
Date2016-06-10 17:10 +0200
Message-ID<rIwel-6ae-15@gated-at.bofh.it>
In reply to#1419488
On Fri, 2016-06-10 at 07:45 -0700, Srinivas Pandruvada wrote:
> On Fri, 2016-06-10 at 16:26 +0200, Bastien Nocera wrote:
> > On Fri, 2016-06-10 at 06:55 -0700, Srinivas Pandruvada wrote:
> > > On Fri, 2016-06-10 at 10:44 +0100, Grant Likely wrote:
> > > [...]
> > > > 
> > > > Yes, I do see the in_*_raw_* files in sysfs, and I'm able to
> > > > get
> > > > data
> > > > out of them. Gnome also seems to recognize that the
> > > > accelerometers
> > > > are
> > > > there because it adds a rotation lock button to the system
> > > > menu.
> > > > 
> > > > However, the events are getting through yet. It may be that I'm
> > > > missing something in my kernel config. I'm rebuilding the
> > > > kernel
> > > > with
> > > > Debian's config for the 4.5.5 kernel as a quick sanity test.
> > > > I'll
> > > > report back when I've tried.
> > > > 
> > > You need to add in /usr/lib/system/systemd/iio-sensor-*
> > > 
> > > After=multi-user.target
> > > 
> > > 
> > > This service starts too early.
> > 
> > Nobody has been able to explain to me why that would be a problem.
> > 
> > Can you back this up with some data? Does iio-sensor-proxy exit too
> > early? Does that leave time to the IIO sub-system to do some init
> > work
> > it should already have done?
> The driver's  trigger callback doesn't even get called to take any
> action or provide any data. So to get called need to restart the
> service or do suspend/resume.

Are there any errors when setting the triggers?

The code there is probably a bit naive, but I'd rather fix that rather
than postpone the start of the daemon.

> After=multi-user.target, is not the ideal solution as it is too late.
> So need further debug.
> 
> > 
> > See also https://github.com/hadess/iio-sensor-proxy/issues/82
> > 
> > > > I'll also take some time and review the patch series later this
> > > > afternoon.
> > > 
> > > Atri Bhattacharya reported issues with suspend/resume. With my
> > > test
> > > patches it is fixed for him
> > > 
> > > If you want to hold on, I will repost with fixes for
> > > susend/resume.
> > 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-
> input" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[toc] | [prev] | [next] | [standalone]


#1419516

FromBastien Nocera <hadess@hadess.net>
Date2016-06-10 17:30 +0200
Message-ID<rIwxH-6gP-7@gated-at.bofh.it>
In reply to#1419505
On Fri, 2016-06-10 at 08:23 -0700, Srinivas Pandruvada wrote:
> On Fri, 2016-06-10 at 17:04 +0200, Bastien Nocera wrote:
> > > 
> 
> [...]
> 
> > Are there any errors when setting the triggers?
> > 
> Is there any debug option in this service to give more verbose
> output?

Add:
Environment="G_MESSAGES_DEBUG=all"

To the service file. You should see the debug in systemctl:
systemctl status iio-sensor-proxy.service

Or in journalctl if there's too much data:
journalctl --reverse -u iio-sensor-proxy.service

Cheers

[toc] | [prev] | [next] | [standalone]


#1419518

FromSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date2016-06-10 17:30 +0200
Message-ID<rIwxH-6gP-9@gated-at.bofh.it>
In reply to#1419505
On Fri, 2016-06-10 at 17:04 +0200, Bastien Nocera wrote:
> > 

[...]

> Are there any errors when setting the triggers?
> 
Is there any debug option in this service to give more verbose output?


> The code there is probably a bit naive, but I'd rather fix that
> rather
> than postpone the start of the daemon.
Agree, we shouldn't postpone. 

Thanks,
Srinivas

> 
> > 
> > After=multi-user.target, is not the ideal solution as it is too
> > late.
> > So need further debug.
> > 
> > > 
> > > 
> > > See also https://github.com/hadess/iio-sensor-proxy/issues/82
> > > 
> > > > 
> > > > > 
> > > > > I'll also take some time and review the patch series later
> > > > > this
> > > > > afternoon.
> > > > Atri Bhattacharya reported issues with suspend/resume. With my
> > > > test
> > > > patches it is fixed for him
> > > > 
> > > > If you want to hold on, I will repost with fixes for
> > > > susend/resume.
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-
> > input" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html

[toc] | [prev] | [next] | [standalone]


#1419456

FromGrant Likely <grant.likely@secretlab.ca>
Date2016-06-10 16:10 +0200
Message-ID<rIvii-5yi-25@gated-at.bofh.it>
In reply to#1419173
On Fri, Jun 10, 2016 at 10:44 AM, Grant Likely
<grant.likely@secretlab.ca> wrote:
> On Thu, Jun 9, 2016 at 10:54 PM, Srinivas Pandruvada
> <srinivas.pandruvada@linux.intel.com> wrote:
>> Hi,
>> On Thu, 2016-06-09 at 22:45 +0100, Grant Likely wrote:
>>> On Tue, May 31, 2016 at 5:27 AM, Srinivas Pandruvada
>>> <srinivas.pandruvada@linux.intel.com> wrote:
>>> >
>>> > Starting from Cherrytrail, multiple generation of Intel processors
>>> > offers
>>> > on package sensor hub. Several recent tablets, 2-in-1 convertible
>>> > laptops
>>> > are using ISH instead of external sensor hubs. This resulted in
>>> > lack of
>>> > support of sensor function like device rotation and auto backlight
>>> > adjustment. In addition, depending on the OEM implementation,
>>> > support of ISH
>>> > is required to support low power sleep states.
>>> >
>>> > The support of ISH on Linux platforms is not new. Android platforms
>>> > with
>>> > Intel SoCs had this support for a while submitted by Daniel Drubin.
>>> > This patcheset is reusing most of those changes with  clean up and
>>> > removing Android platform specific changes.
>>> Hi Srinivas,
>>>
>>> Thanks for this patch series. I've got an HP Spectre x360 G2
>>> (skylake), and I've built a 4.6.0 kernel with this driver patched in.
>>> It detects the sensors hub, and creates IIO devices under
>>> /sys/bus/iio/devices:
>>>
>>> $ ls /sys/bus/iio/devices/
>>> iio:device0  iio:device1  iio:device2  iio:device3  iio:device4
>>> iio:device5  iio:device6  iio:device7  iio:device8  iio:device9
>>> trigger0  trigger1  trigger2  trigger3  trigger4  trigger5  trigger6
>>> trigger7  trigger8  trigger9
>>>
>>> However, I haven't figured out how to test it yet. (This is the first
>>> time I'm working with IIO). Do you have any test code or test
>>> procedures to show if it is working?
>>>
>> If you use Fedora 23 (or any distro with iio-sensor-proxy with gnome
>> rotation stuff), you should be able to do screen rotation and
>> brightness using ALS.
>> Each of these folders should have some raw sysfs files
>> in_xxx_raw_xx
>>
>> You should be able to use "cat" on them.
>
> Yes, I do see the in_*_raw_* files in sysfs, and I'm able to get data
> out of them. Gnome also seems to recognize that the accelerometers are
> there because it adds a rotation lock button to the system menu.
>
> However, the events are getting through yet. It may be that I'm
> missing something in my kernel config. I'm rebuilding the kernel with
> Debian's config for the 4.5.5 kernel as a quick sanity test. I'll
> report back when I've tried.

Still no joy here on getting wired up to Gnome. The sensors exist, and
I can view the output. For example, the following shell command will
give a live view of the accelerometer settings:

while true; clear; do { for f in iio\:device*/in_accel*raw; do echo $f
`cat $f`; done }; sleep 0.25s; done

In "Laptop mode":
iio:device1/in_accel_x_raw 2184
iio:device1/in_accel_y_raw -968620
iio:device1/in_accel_z_raw -224273
iio:device3/in_accel_x_raw 5784
iio:device3/in_accel_y_raw -946324
iio:device3/in_accel_z_raw -218647

When rotated clockwise 90 degrees:
iio:device1/in_accel_x_raw 1013843
iio:device1/in_accel_y_raw 8523
iio:device1/in_accel_z_raw -12259
iio:device3/in_accel_x_raw 1012352
iio:device3/in_accel_y_raw 14487
iio:device3/in_accel_z_raw -6891

When lying flat:
iio:device1/in_accel_x_raw 6995
iio:device1/in_accel_y_raw -32824
iio:device1/in_accel_z_raw -986080
iio:device3/in_accel_x_raw 5797
iio:device3/in_accel_y_raw -31402
iio:device3/in_accel_z_raw -984732

However, Gnome isn't picking up the rotation events. I don't know
where in the stack things are falling down. I do have iio-sensor-proxy
running. Any hints on debugging this?

Yet, some stuff is working now. The keyboard (but not the trackpad)
gets disabled when folded back in tablet mode.

g.

>
> I'll also take some time and review the patch series later this afternoon.
>
> g.
>
>>
>> Thanks,
>> Srinivas
>>
>>
>>> Thanks,
>>> g.
>>>
>>> >
>>> >
>>> > This series is tested on:
>>> > - Lenovo Yoga 260 with Skylake processor
>>> > - HP Pavilion x2 detachable with Cherrytrail
>>> >
>>> > The user mode ABI is still same as external sensor hubs using Linux
>>> > IIO. So existing user mode software should still work without
>>> > change.
>>> > This series primarily brings in new HID transport used in ISH.
>>> >
>>> > This series submitted as a RFC to try on several devices. We have
>>> > received request from Linux users who wanted this support. So I
>>> > hope all
>>> > those users try and give feedback.
>>> >
>>> > Daniel Drubin (3):
>>> >   hid: intel_ish-hid: ISH Transport layer
>>> >   hid: intel-ish-hid: ipc layer
>>> >   hid: intel-ish-hid: ISH HID client driver
>>> >
>>> > Srinivas Pandruvada (1):
>>> >   Documentation: hid: Intel ISH HID document
>>> >
>>> >  Documentation/hid/intel-ish-hid.txt          |  375 +++++++++
>>> >  drivers/hid/Kconfig                          |    2 +
>>> >  drivers/hid/Makefile                         |    2 +
>>> >  drivers/hid/intel-ish-hid/Kconfig            |   27 +
>>> >  drivers/hid/intel-ish-hid/Makefile           |   20 +
>>> >  drivers/hid/intel-ish-hid/ipc/hw-ish-regs.h  |  220 +++++
>>> >  drivers/hid/intel-ish-hid/ipc/hw-ish.h       |   71 ++
>>> >  drivers/hid/intel-ish-hid/ipc/ipc.c          |  710
>>> > ++++++++++++++++
>>> >  drivers/hid/intel-ish-hid/ipc/pci-ish.c      |  238 ++++++
>>> >  drivers/hid/intel-ish-hid/ipc/utils.h        |   65 ++
>>> >  drivers/hid/intel-ish-hid/ishtp-hid-client.c |  672
>>> > +++++++++++++++
>>> >  drivers/hid/intel-ish-hid/ishtp-hid.c        |  201 +++++
>>> >  drivers/hid/intel-ish-hid/ishtp-hid.h        |  157 ++++
>>> >  drivers/hid/intel-ish-hid/ishtp/bus.c        |  670
>>> > +++++++++++++++
>>> >  drivers/hid/intel-ish-hid/ishtp/bus.h        |   99 +++
>>> >  drivers/hid/intel-ish-hid/ishtp/client.c     | 1131
>>> > ++++++++++++++++++++++++++
>>> >  drivers/hid/intel-ish-hid/ishtp/client.h     |  196 +++++
>>> >  drivers/hid/intel-ish-hid/ishtp/dma-if.c     |  175 ++++
>>> >  drivers/hid/intel-ish-hid/ishtp/hbm.c        |  911
>>> > +++++++++++++++++++++
>>> >  drivers/hid/intel-ish-hid/ishtp/hbm.h        |  319 ++++++++
>>> >  drivers/hid/intel-ish-hid/ishtp/init.c       |   94 +++
>>> >  drivers/hid/intel-ish-hid/ishtp/ishtp-dev.h  |  276 +++++++
>>> >  include/trace/events/intel_ish.h             |   30 +
>>> >  23 files changed, 6661 insertions(+)
>>> >  create mode 100644 Documentation/hid/intel-ish-hid.txt
>>> >  create mode 100644 drivers/hid/intel-ish-hid/Kconfig
>>> >  create mode 100644 drivers/hid/intel-ish-hid/Makefile
>>> >  create mode 100644 drivers/hid/intel-ish-hid/ipc/hw-ish-regs.h
>>> >  create mode 100644 drivers/hid/intel-ish-hid/ipc/hw-ish.h
>>> >  create mode 100644 drivers/hid/intel-ish-hid/ipc/ipc.c
>>> >  create mode 100644 drivers/hid/intel-ish-hid/ipc/pci-ish.c
>>> >  create mode 100644 drivers/hid/intel-ish-hid/ipc/utils.h
>>> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp-hid-client.c
>>> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp-hid.c
>>> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp-hid.h
>>> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/bus.c
>>> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/bus.h
>>> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/client.c
>>> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/client.h
>>> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/dma-if.c
>>> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/hbm.c
>>> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/hbm.h
>>> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/init.c
>>> >  create mode 100644 drivers/hid/intel-ish-hid/ishtp/ishtp-dev.h
>>> >  create mode 100644 include/trace/events/intel_ish.h
>>> >
>>> > --
>>> > 1.9.1
>>> >

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web