Re: Stylus reports 1% battery

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I wrote a small patch that fixes this issue by ignoring the battery of the device in question. I was able to test it and it works fine. The patch is attached. If the idea is OK and you want anything changed let me know. Thanks.

Trent

On Sat, Sep 15, 2018 at 01:59:14AM -0600, Trent Gamblin wrote:
> With an ELAN touchscreen and active stylus, the stylus reports 1% battery at > all times. I've used several batteries including 2 brand new ones, and tried > 2 new styluses. I noticed in the USB HID driver the possibility of ignoring > the battery on devices by adding IDs to the code, perhaps it's a good idea
> with this device.
>
> When I use the stylus it pops up a notification saying the battery is low. > On Windows, I don't get any notification nor does there seem to be any way > to check the battery level, so I think it might not be a valid value at all.
> The troubleshooting manual from Dell for the stylus simply says if the
> stylus isn't working anymore, replace the battery. I'm using a Dell Inspiron
> 5379 laptop.
>
> lsusb -vd output is attached.
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 5146ee029db4..ee4bbc8bf672 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -374,6 +374,7 @@
 #define USB_DEVICE_ID_TOSHIBA_CLICK_L9W	0x0401
 #define USB_DEVICE_ID_HP_X2		0x074d
 #define USB_DEVICE_ID_HP_X2_10_COVER	0x0755
+#define USB_DEVICE_ID_DELL_5379		0x2361
 
 #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 a481eaf39e88..b3236850210f 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -325,6 +325,8 @@ static const struct hid_device_id hid_battery_quirks[] = {
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM,
 		USB_DEVICE_ID_ELECOM_BM084),
 	  HID_BATTERY_QUIRK_IGNORE },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_ELAN, USB_DEVICE_ID_DELL_5379),
+	  HID_BATTERY_QUIRK_IGNORE },
 	{}
 };
 

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux