[PATCH] HID: wacom: Add Dell Latitude 7275 battery quirk

Subsystems: hid core layer, hid wacom driver, the rest

STALE1863d REVIEWED: 1 (0M)

1 review trailer.

2 messages, 2 authors, 2021-09-04 · open the first message on its own page

[PATCH] HID: wacom: Add Dell Latitude 7275 battery quirk

From: Jérôme de Bretagne <hidden>
Date: 2021-09-04 20:58:59

The Wacom touchscreen/digitizer in the Dell Latitude 7275
mistakenly reports having a battery, add a quirk to ignore it.

Signed-off-by: Jérôme de Bretagne <redacted>
Tested-by: Jérôme de Bretagne <redacted>
---
 drivers/hid/wacom_wac.c | 7 +++++++
 1 file changed, 7 insertions(+)
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index 81ba642adcb7..4d4503cbe308 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -3574,6 +3574,13 @@ void wacom_setup_device_quirks(struct wacom *wacom)
 		__clear_bit(MSC_SERIAL, wacom_wac->pen_input->mscbit);
 		__clear_bit(EV_MSC, wacom_wac->pen_input->evbit);
 	}
+
+	/*
+	 * The Wacom touchscreen/digitizer in the Dell Latitude 7275 mistakenly
+	 * reports having a battery, let's ignore it.
+	 */
+	if (wacom->hdev->product == 0x4804)
+		features->quirks &= ~WACOM_QUIRK_BATTERY;
 }
 
 int wacom_setup_pen_input_capabilities(struct input_dev *input_dev,
-- 
2.30.2

Re: [PATCH] HID: wacom: Add Dell Latitude 7275 battery quirk

From: Filipe Laíns <hidden>
Date: 2021-09-04 23:05:26

On Sat, 2021-09-04 at 22:58 +0200, Jérôme de Bretagne wrote:
quoted hunk
The Wacom touchscreen/digitizer in the Dell Latitude 7275
mistakenly reports having a battery, add a quirk to ignore it.

Signed-off-by: Jérôme de Bretagne <redacted>
Tested-by: Jérôme de Bretagne <redacted>
---
 drivers/hid/wacom_wac.c | 7 +++++++
 1 file changed, 7 insertions(+)
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index 81ba642adcb7..4d4503cbe308 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -3574,6 +3574,13 @@ void wacom_setup_device_quirks(struct wacom *wacom)
                __clear_bit(MSC_SERIAL, wacom_wac->pen_input->mscbit);
                __clear_bit(EV_MSC, wacom_wac->pen_input->evbit);
        }
+
+       /*
+        * The Wacom touchscreen/digitizer in the Dell Latitude 7275
mistakenly
+        * reports having a battery, let's ignore it.
+        */
+       if (wacom->hdev->product == 0x4804)
We probably want a define for this ID.
+               features->quirks &= ~WACOM_QUIRK_BATTERY;
 }
 
 int wacom_setup_pen_input_capabilities(struct input_dev *input_dev,
Cheers,
Filipe Laíns
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help