* [PATCH v1 5/8] hid: Pen battery quirk for Surface Pro 12in
[not found] <cover.1778498477.git.harrison.vanderbyl@gmail.com>
@ 2026-05-11 14:40 ` Harrison Vanderbyl
2026-05-12 6:07 ` sashiko-bot
2026-05-12 16:15 ` Jiri Kosina
0 siblings, 2 replies; 3+ messages in thread
From: Harrison Vanderbyl @ 2026-05-11 14:40 UTC (permalink / raw)
To: linux-arm-msm, Jiri Kosina, Benjamin Tissoires, linux-input,
linux-kernel
The pen setup for this device uses bluetooth for
communicating battery levels and status instead of
reporting it over i2c.
Without this quirk, the device either reports an
extra, broken phantom battery, or hangs.
Signed-off-by: Harrison Vanderbyl <harrison.vanderbyl@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 0cf63742315b..d16f55479786 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -459,6 +459,7 @@
#define USB_DEVICE_ID_HP_X2 0x074d
#define USB_DEVICE_ID_HP_X2_10_COVER 0x0755
#define I2C_DEVICE_ID_CHROMEBOOK_TROGDOR_POMPOM 0x2F81
+#define I2C_DEVICE_ID_SURFACE_PRO_12IN 0x4376
#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 d73cfa2e73d3..61ecd840d0bd 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -395,6 +395,8 @@ static const struct hid_device_id hid_battery_quirks[] = {
HID_BATTERY_QUIRK_AVOID_QUERY },
{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_CHROMEBOOK_TROGDOR_POMPOM),
HID_BATTERY_QUIRK_AVOID_QUERY },
+ { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_SURFACE_PRO_12IN),
+ HID_BATTERY_QUIRK_IGNORE },
/*
* Elan HID touchscreens seem to all report a non present battery,
* set HID_BATTERY_QUIRK_IGNORE for all Elan I2C and USB HID devices.
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1 5/8] hid: Pen battery quirk for Surface Pro 12in
2026-05-11 14:40 ` [PATCH v1 5/8] hid: Pen battery quirk for Surface Pro 12in Harrison Vanderbyl
@ 2026-05-12 6:07 ` sashiko-bot
2026-05-12 16:15 ` Jiri Kosina
1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-05-12 6:07 UTC (permalink / raw)
To: Harrison Vanderbyl; +Cc: dmitry.torokhov, linux-input
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Macro value alignment uses spaces instead of a tab.
--
commit c48c3082a15452ea3cc6ed81c88834aa52ab9d60
Author: Harrison Vanderbyl <harrison.vanderbyl@gmail.com>
hid: Pen battery quirk for Surface Pro 12in
This commit adds a quirk to ignore the battery on the Surface Pro 12in
pen, which uses Bluetooth for battery reporting instead of I2C. This
prevents a phantom battery or device hang.
> diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
> --- a/drivers/hid/hid-ids.h
> +++ b/drivers/hid/hid-ids.h
> @@ -459,6 +459,7 @@
> #define USB_DEVICE_ID_HP_X2 0x074d
> #define USB_DEVICE_ID_HP_X2_10_COVER 0x0755
> #define I2C_DEVICE_ID_CHROMEBOOK_TROGDOR_POMPOM 0x2F81
> +#define I2C_DEVICE_ID_SURFACE_PRO_12IN 0x4376
This isn't a bug, but it looks like spaces were used here instead of a tab
to align the macro value.
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1778498477.git.harrison.vanderbyl@gmail.com?part=5
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1 5/8] hid: Pen battery quirk for Surface Pro 12in
2026-05-11 14:40 ` [PATCH v1 5/8] hid: Pen battery quirk for Surface Pro 12in Harrison Vanderbyl
2026-05-12 6:07 ` sashiko-bot
@ 2026-05-12 16:15 ` Jiri Kosina
1 sibling, 0 replies; 3+ messages in thread
From: Jiri Kosina @ 2026-05-12 16:15 UTC (permalink / raw)
To: Harrison Vanderbyl
Cc: linux-arm-msm, Benjamin Tissoires, linux-input, linux-kernel
On Tue, 12 May 2026, Harrison Vanderbyl wrote:
> The pen setup for this device uses bluetooth for
> communicating battery levels and status instead of
> reporting it over i2c.
>
> Without this quirk, the device either reports an
> extra, broken phantom battery, or hangs.
>
> Signed-off-by: Harrison Vanderbyl <harrison.vanderbyl@gmail.com>
As this is apparently part of some bigger series, I am not sure who is
expected to merge this.
FWIW
Acked-by: Jiri Kosina <jkosina@suse.com>
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-12 16:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <cover.1778498477.git.harrison.vanderbyl@gmail.com>
2026-05-11 14:40 ` [PATCH v1 5/8] hid: Pen battery quirk for Surface Pro 12in Harrison Vanderbyl
2026-05-12 6:07 ` sashiko-bot
2026-05-12 16:15 ` Jiri Kosina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox