From: Patrick <ctx.xda-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Bastien Nocera <hadess-0MeiytkfxGOsTnJN9+BGXg@public.gmane.org>
Cc: jikos-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
benjamin.tissoires-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
srinivas.pandruvada-VuQAYsv1563Yd54FQh9/CA@public.gmane.org,
linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] HID: Add quirk for Lenovo Yoga 910 with ITE Chips
Date: Sat, 15 Jul 2017 22:05:18 +0200 [thread overview]
Message-ID: <20170715200518.GA24502@foobar> (raw)
In-Reply-To: <1500141490.2490.1.camel-0MeiytkfxGOsTnJN9+BGXg@public.gmane.org>
On Sat, Jul 15, 2017 at 07:58:10PM +0200, Bastien Nocera wrote:
> On Sat, 2017-07-15 at 19:52 +0200, Patrick Pedersen wrote:
> > On Sat, Jul 15, 2017 at 4:29 PM, Bastien Nocera <hadess-0MeiytkfxGOsTnJN9+BGXg@public.gmane.org>
> > wrote:
> > > On Sat, 2017-07-15 at 14:27 +0200, Patrick Pedersen wrote:
> > > > As with previous generations of this device (see https://patchwor
> > > k.ke
> > > > rnel.org/patch/7887361/), the ITE
> > > > HID Sensor Hub, responsible for the accelerometer and als sensor,
> > > > requires a quirk entry.
> > > >
> > > > Without the entry, the Sensor Hub can't be accessed and the
> > > kernel
> > > > fails to report any movements. As a result
> > > > iio-sensor-proxy receives no new data.
> > > >
> > > > It shall additionally be noted that the i2c-hid 'sleep' bug
> > > (present
> > > > since kernel ver. 4.3)
> > > > still affects the driver. This means that the sensor hub will not
> > > > report any movement, until
> > > > the device is suspended and resumed.
> > > >
> > > > Signed-off-by: Patrick Pedersen <ctx.xda-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > > > ---
> > > > drivers/hid/hid-ids.h | 1 +
> > > > drivers/hid/hid-sensor-hub.c | 3 +++
> > > > 2 files changed, 4 insertions(+)
> > > >
> > > > diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
> > > > index 4f9a3938189a..b427a0bcfbe8 100644
> > > > --- a/drivers/hid/hid-ids.h
> > > > +++ b/drivers/hid/hid-ids.h
> > > > @@ -565,6 +565,7 @@
> > > > #define USB_DEVICE_ID_ITE_LENOVO_YOGA 0x8386
> > > > #define USB_DEVICE_ID_ITE_LENOVO_YOGA2 0x8350
> > > > #define USB_DEVICE_ID_ITE_LENOVO_YOGA900 0x8396
> > > > +#define USB_DEVICE_ID_ITE_LENOVO_YOGA910 0x8186
> > > >
> > > > #define USB_VENDOR_ID_JABRA 0x0b0e
> > > > #define USB_DEVICE_ID_JABRA_SPEAK_410 0x0412
> > > > diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-
> > > sensor-
> > > > hub.c
> > > > index 4ef73374a8f9..85b8425483bd 100644
> > > > --- a/drivers/hid/hid-sensor-hub.c
> > > > +++ b/drivers/hid/hid-sensor-hub.c
> > > > @@ -820,6 +820,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_ITE,
> > > > + USB_DEVICE_ID_ITE_LENOVO_YOGA910),
> > > > + .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},
> > >
> > > At this point, wouldn't it make sense to apply the quirk to *all*
> > > ITE
> > > devices in Lenovo Yoga laptops?
> >
> > I'm not sure If I got your suggestion right.
> >
> > Those laptops do not share the same ITE chip. ITE is simply
> > the vendor/manufacturer of the hid sensor hub. All three defined
> > yoga laptops use a different ITE sensor hub model.
> >
> > To make this clear, my device, the
> > Lenovo Yoga 910 uses a ITE8186,
> > where the Yoga 900 uses a ITE8396,
> > the Yoga 2 a ITE8350 and so on
> >
> > Now what "could" me done, is to detect and set the quirk
> > automatically.
> > This should be doable, as the Hardware PID corresponds to the
> > model number of the Sensor Hub (ex. ITE8186 = PID 0x8186)
>
> I'm saying that if the vendor of the device is USB_VENDOR_ID_ITE and
> the manufacturer of the hardware is Lenovo in the DMI information, and
> the model of hardware contains "Yoga", that HID_SENSOR_HUB_ENUM_QUIRK
> be applied automatically, instead of adding quirks one-by-one.
First of all, I would like to appologise that my previous reply was
not caught by the mailing list. I had a frustrating time getting
mutt to work and decided to use the gmail web interface. Turns out
that was a bad idea. Fortunately it seems like I got things right
this time.
Now to the automated ITE chip detection you've proposed. I likely lack
the driver and kernel knowledge to implement a feature of such. In the
upcoming days I will to do some research on the HID drivers and see what
I can do. The goal of this patch was to simply fix the issue for my device,
not to find a new or different solution.
Patrick
WARNING: multiple messages have this Message-ID (diff)
From: Patrick <ctx.xda@gmail.com>
To: Bastien Nocera <hadess@hadess.net>
Cc: jikos@kernel.org, benjamin.tissoires@redhat.com,
jic23@kernel.org, srinivas.pandruvada@linux.intel.com,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-iio@vger.kernel.org
Subject: Re: [PATCH] HID: Add quirk for Lenovo Yoga 910 with ITE Chips
Date: Sat, 15 Jul 2017 22:05:18 +0200 [thread overview]
Message-ID: <20170715200518.GA24502@foobar> (raw)
In-Reply-To: <1500141490.2490.1.camel@hadess.net>
On Sat, Jul 15, 2017 at 07:58:10PM +0200, Bastien Nocera wrote:
> On Sat, 2017-07-15 at 19:52 +0200, Patrick Pedersen wrote:
> > On Sat, Jul 15, 2017 at 4:29 PM, Bastien Nocera <hadess@hadess.net>
> > wrote:
> > > On Sat, 2017-07-15 at 14:27 +0200, Patrick Pedersen wrote:
> > > > As with previous generations of this device (see https://patchwor
> > > k.ke
> > > > rnel.org/patch/7887361/), the ITE
> > > > HID Sensor Hub, responsible for the accelerometer and als sensor,
> > > > requires a quirk entry.
> > > >
> > > > Without the entry, the Sensor Hub can't be accessed and the
> > > kernel
> > > > fails to report any movements. As a result
> > > > iio-sensor-proxy receives no new data.
> > > >
> > > > It shall additionally be noted that the i2c-hid 'sleep' bug
> > > (present
> > > > since kernel ver. 4.3)
> > > > still affects the driver. This means that the sensor hub will not
> > > > report any movement, until
> > > > the device is suspended and resumed.
> > > >
> > > > Signed-off-by: Patrick Pedersen <ctx.xda@gmail.com>
> > > > ---
> > > > drivers/hid/hid-ids.h | 1 +
> > > > drivers/hid/hid-sensor-hub.c | 3 +++
> > > > 2 files changed, 4 insertions(+)
> > > >
> > > > diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
> > > > index 4f9a3938189a..b427a0bcfbe8 100644
> > > > --- a/drivers/hid/hid-ids.h
> > > > +++ b/drivers/hid/hid-ids.h
> > > > @@ -565,6 +565,7 @@
> > > > #define USB_DEVICE_ID_ITE_LENOVO_YOGA 0x8386
> > > > #define USB_DEVICE_ID_ITE_LENOVO_YOGA2 0x8350
> > > > #define USB_DEVICE_ID_ITE_LENOVO_YOGA900 0x8396
> > > > +#define USB_DEVICE_ID_ITE_LENOVO_YOGA910 0x8186
> > > >
> > > > #define USB_VENDOR_ID_JABRA 0x0b0e
> > > > #define USB_DEVICE_ID_JABRA_SPEAK_410 0x0412
> > > > diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-
> > > sensor-
> > > > hub.c
> > > > index 4ef73374a8f9..85b8425483bd 100644
> > > > --- a/drivers/hid/hid-sensor-hub.c
> > > > +++ b/drivers/hid/hid-sensor-hub.c
> > > > @@ -820,6 +820,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_ITE,
> > > > + USB_DEVICE_ID_ITE_LENOVO_YOGA910),
> > > > + .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},
> > >
> > > At this point, wouldn't it make sense to apply the quirk to *all*
> > > ITE
> > > devices in Lenovo Yoga laptops?
> >
> > I'm not sure If I got your suggestion right.
> >
> > Those laptops do not share the same ITE chip. ITE is simply
> > the vendor/manufacturer of the hid sensor hub. All three defined
> > yoga laptops use a different ITE sensor hub model.
> >
> > To make this clear, my device, the
> > Lenovo Yoga 910 uses a ITE8186,
> > where the Yoga 900 uses a ITE8396,
> > the Yoga 2 a ITE8350 and so on
> >
> > Now what "could" me done, is to detect and set the quirk
> > automatically.
> > This should be doable, as the Hardware PID corresponds to the
> > model number of the Sensor Hub (ex. ITE8186 = PID 0x8186)
>
> I'm saying that if the vendor of the device is USB_VENDOR_ID_ITE and
> the manufacturer of the hardware is Lenovo in the DMI information, and
> the model of hardware contains "Yoga", that HID_SENSOR_HUB_ENUM_QUIRK
> be applied automatically, instead of adding quirks one-by-one.
First of all, I would like to appologise that my previous reply was
not caught by the mailing list. I had a frustrating time getting
mutt to work and decided to use the gmail web interface. Turns out
that was a bad idea. Fortunately it seems like I got things right
this time.
Now to the automated ITE chip detection you've proposed. I likely lack
the driver and kernel knowledge to implement a feature of such. In the
upcoming days I will to do some research on the HID drivers and see what
I can do. The goal of this patch was to simply fix the issue for my device,
not to find a new or different solution.
Patrick
next prev parent reply other threads:[~2017-07-15 20:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-15 12:27 [PATCH] HID: Add quirk for Lenovo Yoga 910 with ITE Chips Patrick Pedersen
2017-07-15 12:27 ` Patrick Pedersen
2017-07-15 14:29 ` Bastien Nocera
2017-07-15 17:52 ` Patrick Pedersen
2017-07-15 17:58 ` Bastien Nocera
[not found] ` <1500141490.2490.1.camel-0MeiytkfxGOsTnJN9+BGXg@public.gmane.org>
2017-07-15 20:05 ` Patrick [this message]
2017-07-15 20:05 ` Patrick
2017-07-17 20:19 ` Srinivas Pandruvada
2017-07-17 23:22 ` Bastien Nocera
2017-07-16 7:39 ` Arek Burdach
[not found] ` <af21ea47-29df-443d-0a3d-5fc36d8cf119-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-16 10:23 ` Brian Masney
2017-07-16 10:23 ` Brian Masney
2017-07-17 6:26 ` Arek Burdach
2017-07-17 19:58 ` Srinivas Pandruvada
2017-08-01 12:23 ` Patrick
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=20170715200518.GA24502@foobar \
--to=ctx.xda-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=benjamin.tissoires-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=hadess-0MeiytkfxGOsTnJN9+BGXg@public.gmane.org \
--cc=jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=jikos-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=srinivas.pandruvada-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.