diff mbox series

HID: Ignore HP Envy x360 eu0009nv stylus battery

Message ID 20221124174932.6105-1-jose.exposito89@gmail.com (mailing list archive)
State Mainlined
Commit cec827d658dd5c287ea8925737d45f0a60e47422
Delegated to: Jiri Kosina
Headers show
Series HID: Ignore HP Envy x360 eu0009nv stylus battery | expand

Commit Message

José Expósito Nov. 24, 2022, 5:49 p.m. UTC
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(+)

Comments

Jiri Kosina Dec. 20, 2022, 2:33 p.m. UTC | #1
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é.
diff mbox series

Patch

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