linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] HID: Ignore HP Envy x360 eu0009nv stylus battery
@ 2022-11-24 17:49 José Expósito
  2022-12-20 14:33 ` Jiri Kosina
  0 siblings, 1 reply; 2+ messages in thread
From: José Expósito @ 2022-11-24 17:49 UTC (permalink / raw)
  To: jikos
  Cc: benjamin.tissoires, rydberg, linux-input, linux-kernel,
	José Expósito, Ioannis Iliopoulos

Battery status is reported for the HP Envy x360 eu0009nv stylus even
though it does not have battery.

Prevent it from always reporting the battery as low (1%).

Link: https://gitlab.freedesktop.org/libinput/libinput/-/issues/823
Reported-by: Ioannis Iliopoulos <jxftw2424@gmail.com>
Tested-by: Ioannis Iliopoulos <jxftw2424@gmail.com>
Signed-off-by: José Expósito <jose.exposito89@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 dad953f66996..1423441be6dc 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -411,6 +411,7 @@
 #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_ENVY_X360_EU0009NV	0x2CF9
 #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 859aeb07542e..a4841fee092b 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -377,6 +377,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_15T_DR100),
 	  HID_BATTERY_QUIRK_IGNORE },
+	{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_ENVY_X360_EU0009NV),
+	  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),
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] HID: Ignore HP Envy x360 eu0009nv stylus battery
  2022-11-24 17:49 [PATCH] HID: Ignore HP Envy x360 eu0009nv stylus battery José Expósito
@ 2022-12-20 14:33 ` Jiri Kosina
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2022-12-20 14:33 UTC (permalink / raw)
  To: José Expósito
  Cc: benjamin.tissoires, rydberg, linux-input, linux-kernel,
	Ioannis Iliopoulos

On Thu, 24 Nov 2022, José Expósito wrote:

> Battery status is reported for the HP Envy x360 eu0009nv stylus even
> though it does not have battery.
> 
> Prevent it from always reporting the battery as low (1%).
> 
> Link: https://gitlab.freedesktop.org/libinput/libinput/-/issues/823
> Reported-by: Ioannis Iliopoulos <jxftw2424@gmail.com>
> Tested-by: Ioannis Iliopoulos <jxftw2424@gmail.com>
> Signed-off-by: José Expósito <jose.exposito89@gmail.com>

Applied, thanks José.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-20 14:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-24 17:49 [PATCH] HID: Ignore HP Envy x360 eu0009nv stylus battery José Expósito
2022-12-20 14:33 ` Jiri Kosina

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).