diff mbox series

HID: add HP 13t-aw100 & 14t-ea100 digitizer battery quirks

Message ID 20230306185026.8B85A1A0008D@ceramic.home.fifi.org
State Accepted
Commit 50c6b976fb66f623440066f8e44309b4c2f687a0
Headers show
Series HID: add HP 13t-aw100 & 14t-ea100 digitizer battery quirks | expand

Commit Message

Philippe Troin March 6, 2023, 6:18 p.m. UTC
Similar to many other devices using the Synopsys Designware Elantech
hardware, HP Spectre x360 13t-aw100 and 14t-ea100 report an empty
battery devices, supposedly for the active stylus.

Apply the HID_BATTERY_QUIRK_IGNORE quirk to ignore the battery reports
from these devices. Note that there are multiple versions of the panel
installed in the 14t-ea100.

Signed-off-by: Philippe Troin <phil@fifi.org>
---
 drivers/hid/hid-ids.h   | 3 +++
 drivers/hid/hid-input.c | 6 ++++++
 2 files changed, 9 insertions(+)

Comments

Jiri Kosina March 10, 2023, 2:42 p.m. UTC | #1
On Mon, 6 Mar 2023, Philippe Troin wrote:

> Similar to many other devices using the Synopsys Designware Elantech
> hardware, HP Spectre x360 13t-aw100 and 14t-ea100 report an empty
> battery devices, supposedly for the active stylus.
> 
> Apply the HID_BATTERY_QUIRK_IGNORE quirk to ignore the battery reports
> from these devices. Note that there are multiple versions of the panel
> installed in the 14t-ea100.
> 
> Signed-off-by: Philippe Troin <phil@fifi.org>
> ---
>  drivers/hid/hid-ids.h   | 3 +++
>  drivers/hid/hid-input.c | 6 ++++++
>  2 files changed, 9 insertions(+)
> 
> diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
> index 63545cd307e5..22e716b66fb8 100644
> --- a/drivers/hid/hid-ids.h
> +++ b/drivers/hid/hid-ids.h
> @@ -420,6 +420,9 @@
>  #define I2C_DEVICE_ID_SURFACE_GO_TOUCHSCREEN	0x261A
>  #define I2C_DEVICE_ID_SURFACE_GO2_TOUCHSCREEN	0x2A1C
>  #define I2C_DEVICE_ID_LENOVO_YOGA_C630_TOUCHSCREEN	0x279F
> +#define I2C_DEVICE_ID_HP_SPECTRE_X360_13T_AW100	0x29F5
> +#define I2C_DEVICE_ID_HP_SPECTRE_X360_14T_EA100_V1	0x2BED
> +#define I2C_DEVICE_ID_HP_SPECTRE_X360_14T_EA100_V2	0x2BEE
>  
>  #define USB_VENDOR_ID_ELECOM		0x056e
>  #define USB_DEVICE_ID_ELECOM_BM084	0x0061
> diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
> index 7fc967964dd8..5c65a584b3fa 100644
> --- a/drivers/hid/hid-input.c
> +++ b/drivers/hid/hid-input.c
> @@ -398,6 +398,12 @@ static const struct hid_device_id hid_battery_quirks[] = {
>  	  HID_BATTERY_QUIRK_IGNORE },
>  	{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_LENOVO_YOGA_C630_TOUCHSCREEN),
>  	  HID_BATTERY_QUIRK_IGNORE },
> +	{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_SPECTRE_X360_13T_AW100),
> +	  HID_BATTERY_QUIRK_IGNORE },
> +	{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_SPECTRE_X360_14T_EA100_V1),
> +	  HID_BATTERY_QUIRK_IGNORE },
> +	{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_SPECTRE_X360_14T_EA100_V2),
> +	  HID_BATTERY_QUIRK_IGNORE },

Applied, thanks.
diff mbox series

Patch

diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 63545cd307e5..22e716b66fb8 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -420,6 +420,9 @@ 
 #define I2C_DEVICE_ID_SURFACE_GO_TOUCHSCREEN	0x261A
 #define I2C_DEVICE_ID_SURFACE_GO2_TOUCHSCREEN	0x2A1C
 #define I2C_DEVICE_ID_LENOVO_YOGA_C630_TOUCHSCREEN	0x279F
+#define I2C_DEVICE_ID_HP_SPECTRE_X360_13T_AW100	0x29F5
+#define I2C_DEVICE_ID_HP_SPECTRE_X360_14T_EA100_V1	0x2BED
+#define I2C_DEVICE_ID_HP_SPECTRE_X360_14T_EA100_V2	0x2BEE
 
 #define USB_VENDOR_ID_ELECOM		0x056e
 #define USB_DEVICE_ID_ELECOM_BM084	0x0061
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 7fc967964dd8..5c65a584b3fa 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -398,6 +398,12 @@  static const struct hid_device_id hid_battery_quirks[] = {
 	  HID_BATTERY_QUIRK_IGNORE },
 	{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_LENOVO_YOGA_C630_TOUCHSCREEN),
 	  HID_BATTERY_QUIRK_IGNORE },
+	{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_SPECTRE_X360_13T_AW100),
+	  HID_BATTERY_QUIRK_IGNORE },
+	{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_SPECTRE_X360_14T_EA100_V1),
+	  HID_BATTERY_QUIRK_IGNORE },
+	{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_SPECTRE_X360_14T_EA100_V2),
+	  HID_BATTERY_QUIRK_IGNORE },
 	{}
 };