Re: [RFC 0/4] Intel Integrated Sensor Hub Support (ISH)
From: Srinivas Pandruvada
Date: Thu Jun 09 2016 - 17:53:16 EST
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@xxxxxxxxxxxxxxx> 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
> >