The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Antheas Kapenekakis <lkml@antheas.dev>
To: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <bentiss@kernel.org>,
	Antheas Kapenekakis <lkml@antheas.dev>
Subject: [PATCH 4/5] HID: Add quirk to ignore the touchscreen battery on OneXPlayer X1
Date: Sat, 22 Feb 2025 17:43:20 +0100	[thread overview]
Message-ID: <20250222164321.181340-5-lkml@antheas.dev> (raw)
In-Reply-To: <20250222164321.181340-1-lkml@antheas.dev>

The X1 devices come with a pen-capable touchscreen, in which the HID
descriptor reports there is always a battery at 100% charge. Quirk it
to not report the battery status.

Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
---
 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 7e400624908e..8e2fc152b089 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -1001,6 +1001,7 @@
 #define USB_VENDOR_ID_NOVATEK		0x0603
 #define USB_DEVICE_ID_NOVATEK_PCT	0x0600
 #define USB_DEVICE_ID_NOVATEK_MOUSE	0x1602
+#define I2C_DEVICE_ID_ONEXPLAYER_X1    0xF001
 
 #define USB_VENDOR_ID_NTI               0x0757
 #define USB_DEVICE_ID_USB_SUN           0x0a00
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 9d80635a91eb..08e87577feef 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -390,6 +390,8 @@ static const struct hid_device_id hid_battery_quirks[] = {
 	 * set HID_BATTERY_QUIRK_IGNORE for all Elan I2C-HID devices.
 	 */
 	{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, HID_ANY_ID), HID_BATTERY_QUIRK_IGNORE },
+	{ HID_I2C_DEVICE(USB_VENDOR_ID_NOVATEK, I2C_DEVICE_ID_ONEXPLAYER_X1),
+	  HID_BATTERY_QUIRK_IGNORE },
 	{}
 };
 
-- 
2.48.1


  parent reply	other threads:[~2025-02-22 16:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-22 16:43 [PATCH 0/5] drm: panel-orientation-quirks: Add 2024 OneXPlayer line & ZOTAC Zone orientation quirks Antheas Kapenekakis
2025-02-22 16:43 ` [PATCH 1/5] drm: panel-orientation-quirks: Add OneXPlayer X1 AMD and Intel quirk Antheas Kapenekakis
2025-03-17  9:08   ` Hans de Goede
2025-02-22 16:43 ` [PATCH 2/5] drm: panel-orientation-quirks: Add OneXPlayer X1 Mini (AMD) quirk Antheas Kapenekakis
2025-03-17  9:09   ` Hans de Goede
2025-02-22 16:43 ` [PATCH 3/5] drm: panel-orientation-quirks: Add OneXPlayer F1Pro quirk Antheas Kapenekakis
2025-03-17  9:15   ` Hans de Goede
2025-03-17  9:21     ` Antheas Kapenekakis
2025-02-22 16:43 ` Antheas Kapenekakis [this message]
2025-03-03  7:48   ` [PATCH 4/5] HID: Add quirk to ignore the touchscreen battery on OneXPlayer X1 Jiri Kosina
2025-02-22 16:43 ` [PATCH 5/5] drm: panel-orientation-quirks: Add Zotac Gaming Zone quirk Antheas Kapenekakis
2025-03-17  9:20   ` Hans de Goede
2025-03-17  9:23     ` Antheas Kapenekakis
2025-03-17  9:24       ` Antheas Kapenekakis
2025-03-16 16:57 ` [PATCH 0/5] drm: panel-orientation-quirks: Add 2024 OneXPlayer line & ZOTAC Zone orientation quirks Antheas Kapenekakis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250222164321.181340-5-lkml@antheas.dev \
    --to=lkml@antheas.dev \
    --cc=airlied@gmail.com \
    --cc=bentiss@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox