diff mbox series

HID: Ignore battery for Elan touchscreen on HP Envy X360 15t-dr100

Message ID 20220110034935.15623-1-kkurbjun@gmail.com (mailing list archive)
State Mainlined
Commit f3193ea1b6779023334faa72b214ece457e02656
Delegated to: Jiri Kosina
Headers show
Series HID: Ignore battery for Elan touchscreen on HP Envy X360 15t-dr100 | expand

Commit Message

Karl Kurbjun Jan. 10, 2022, 3:49 a.m. UTC
Battery status on Elan tablet driver is reported for the HP ENVY x360
15t-dr100. There is no separate battery for the Elan controller resulting
in a battery level report of 0% or 1% depending on whether a stylus has
interacted with the screen. These low battery level reports causes a
variety of bad behavior in desktop environments. This patch adds the
appropriate quirk to indicate that the batery status is unused for this
target.

Signed-off-by: Karl Kurbjun <kkurbjun@gmail.com>
---
 drivers/hid/hid-ids.h   | 1 +
 drivers/hid/hid-input.c | 2 ++
 2 files changed, 3 insertions(+)

Comments

Greg KH Jan. 10, 2022, 6:55 a.m. UTC | #1
On Sun, Jan 09, 2022 at 08:49:35PM -0700, Karl Kurbjun wrote:
> Battery status on Elan tablet driver is reported for the HP ENVY x360
> 15t-dr100. There is no separate battery for the Elan controller resulting
> in a battery level report of 0% or 1% depending on whether a stylus has
> interacted with the screen. These low battery level reports causes a
> variety of bad behavior in desktop environments. This patch adds the
> appropriate quirk to indicate that the batery status is unused for this
> target.
> 
> Signed-off-by: Karl Kurbjun <kkurbjun@gmail.com>
> ---
>  drivers/hid/hid-ids.h   | 1 +
>  drivers/hid/hid-input.c | 2 ++
>  2 files changed, 3 insertions(+)


<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>
Karl Kurbjun Jan. 12, 2022, 2:54 a.m. UTC | #2
On 1/9/22 23:55, Greg KH wrote:
> On Sun, Jan 09, 2022 at 08:49:35PM -0700, Karl Kurbjun wrote:
>> Battery status on Elan tablet driver is reported for the HP ENVY x360
>> 15t-dr100. There is no separate battery for the Elan controller resulting
>> in a battery level report of 0% or 1% depending on whether a stylus has
>> interacted with the screen. These low battery level reports causes a
>> variety of bad behavior in desktop environments. This patch adds the
>> appropriate quirk to indicate that the batery status is unused for this
>> target.
>>
>> Signed-off-by: Karl Kurbjun <kkurbjun@gmail.com>
>> ---
>>   drivers/hid/hid-ids.h   | 1 +
>>   drivers/hid/hid-input.c | 2 ++
>>   2 files changed, 3 insertions(+)
> 
> 
> <formletter>
> 
> This is not the correct way to submit patches for inclusion in the
> stable kernel tree.  Please read:
>      https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
> for how to do this properly.
> 
> </formletter>

Thanks Greg,

Sorry for the mix-up on my side.  I read that page before I submitted 
the patch but I went back and reread it.  I was trying to follow "option 
1" but I am guessing what I messed up was the cc in the signed-off area 
rather than the cc through email?

I was looking for an example of that - I found these threads:
https://lore.kernel.org/lkml/20130618161238.626277186@linuxfoundation.org/
and this one was what I was originally modeling my submission off of:
https://lore.kernel.org/lkml/20210125183218.373193047@linuxfoundation.org/

Is there an example of how I should add the cc to the sign-off area.  As 
I read those threads the stable list was added to the email cc?  Should 
I resubmit it to the linux-input with the appropriate change or follow a 
different flow now that the first email went out?

If I were going to resubmit I think I would need to to like so:

...
 > target.
 >
Cc: stable@vger.kernel.org
 > Signed-off-by: Karl Kurbjun <kkurbjun@gmail.com>
 > ---
 >  drivers/hid/hid-ids.h   | 1 +
 >  drivers/hid/hid-input.c | 2 ++
 >  2 files changed, 3 insertions(+)
 >
 > diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
 > index 19da07777d62..a5a5a64c7abc 100644
...

Is that correct?

Karl
Greg KH Jan. 12, 2022, 7:03 a.m. UTC | #3
On Tue, Jan 11, 2022 at 07:54:16PM -0700, Karl Kurbjun wrote:
> On 1/9/22 23:55, Greg KH wrote:
> > On Sun, Jan 09, 2022 at 08:49:35PM -0700, Karl Kurbjun wrote:
> > > Battery status on Elan tablet driver is reported for the HP ENVY x360
> > > 15t-dr100. There is no separate battery for the Elan controller resulting
> > > in a battery level report of 0% or 1% depending on whether a stylus has
> > > interacted with the screen. These low battery level reports causes a
> > > variety of bad behavior in desktop environments. This patch adds the
> > > appropriate quirk to indicate that the batery status is unused for this
> > > target.
> > > 
> > > Signed-off-by: Karl Kurbjun <kkurbjun@gmail.com>
> > > ---
> > >   drivers/hid/hid-ids.h   | 1 +
> > >   drivers/hid/hid-input.c | 2 ++
> > >   2 files changed, 3 insertions(+)
> > 
> > 
> > <formletter>
> > 
> > This is not the correct way to submit patches for inclusion in the
> > stable kernel tree.  Please read:
> >      https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
> > for how to do this properly.
> > 
> > </formletter>
> 
> Thanks Greg,
> 
> Sorry for the mix-up on my side.  I read that page before I submitted the
> patch but I went back and reread it.  I was trying to follow "option 1" but
> I am guessing what I messed up was the cc in the signed-off area rather than
> the cc through email?

Yes, please just put it in the signed-off-by area.

> I was looking for an example of that - I found these threads:
> https://lore.kernel.org/lkml/20130618161238.626277186@linuxfoundation.org/
> and this one was what I was originally modeling my submission off of:
> https://lore.kernel.org/lkml/20210125183218.373193047@linuxfoundation.org/
> 
> Is there an example of how I should add the cc to the sign-off area.  As I
> read those threads the stable list was added to the email cc?  Should I
> resubmit it to the linux-input with the appropriate change or follow a
> different flow now that the first email went out?
> 
> If I were going to resubmit I think I would need to to like so:
> 
> ...
> > target.
> >
> Cc: stable@vger.kernel.org
> > Signed-off-by: Karl Kurbjun <kkurbjun@gmail.com>
> > ---
> >  drivers/hid/hid-ids.h   | 1 +
> >  drivers/hid/hid-input.c | 2 ++
> >  2 files changed, 3 insertions(+)
> >
> > diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
> > index 19da07777d62..a5a5a64c7abc 100644
> ...
> 
> Is that correct?

Yes, that is correct.

thanks,

greg k-h
Jiri Kosina Jan. 12, 2022, 10:13 a.m. UTC | #4
On Sun, 9 Jan 2022, Karl Kurbjun wrote:

> Battery status on Elan tablet driver is reported for the HP ENVY x360
> 15t-dr100. There is no separate battery for the Elan controller resulting
> in a battery level report of 0% or 1% depending on whether a stylus has
> interacted with the screen. These low battery level reports causes a
> variety of bad behavior in desktop environments. This patch adds the
> appropriate quirk to indicate that the batery status is unused for this
> target.
> 
> Signed-off-by: Karl Kurbjun <kkurbjun@gmail.com>

I've added Cc: stable and applied to hid.git#for-5.17/upstream-fixes

Thanks,
diff mbox series

Patch

diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 19da07777d62..a5a5a64c7abc 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -398,6 +398,7 @@ 
 #define USB_DEVICE_ID_HP_X2		0x074d
 #define USB_DEVICE_ID_HP_X2_10_COVER	0x0755
 #define I2C_DEVICE_ID_HP_ENVY_X360_15	0x2d05
+#define I2C_DEVICE_ID_HP_ENVY_X360_15T_DR100	0x29CF
 #define I2C_DEVICE_ID_HP_SPECTRE_X360_15	0x2817
 #define USB_DEVICE_ID_ASUS_UX550VE_TOUCHSCREEN	0x2544
 #define USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN	0x2706
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 03f994541981..ca47682cc730 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -329,6 +329,8 @@  static const struct hid_device_id hid_battery_quirks[] = {
 	  HID_BATTERY_QUIRK_IGNORE },
 	{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_ENVY_X360_15),
 	  HID_BATTERY_QUIRK_IGNORE },
+	{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_ENVY_X360_15T_DR100),
+	  HID_BATTERY_QUIRK_IGNORE },
 	{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_SPECTRE_X360_15),
 	  HID_BATTERY_QUIRK_IGNORE },
 	{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_SURFACE_GO_TOUCHSCREEN),