Skip to contentSkip to conversation

HID-DR.C: fix button count and report descriptor for PID 0x0011

PATCH New Juan Parrado García 1 participant 2 messages Oct 31 – Nov 9 HID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 HID-DR.C: fix button count and report descriptor for PID 0x0011

From bf8c43a670eb83e94c2e7b69b504126b6679fdd5 Mon Sep 17 00:00:00 2001
From: Juan Parrado <[email protected]> Date: Sat, 31 Oct 2026 21:08:56 +0100
Subject: [PATCH] HID-DR.C: fix button count and report descriptor for
PID 0x0011

Some variants of DragonRise Inc. gamepads (PID 0x0011) report 12 buttons instead of the restricted 10 defined in the static fixup descriptor, causing physical buttons mapped to bits 6 and 7 of byte 6 to be ignored by the kernel.

Expand the button Report Count and Usage Maximum to 0x0C (12) and adjust the trailing constant padding accordingly so all physical buttons are correctly reported to input/evtest.

Assisted-by Gemini
---
 drivers/hid/hid-dr.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
drivers/hid/hid-dr.c +0 -0
index a1e10ee8d..e30b7fd94 100644
@@ -196,7 +196,13 @@ static inline int dr_input_configured(struct

hid_device *hid,
/* Size of the original descriptor of the PID 0x0011 joystick */ #define PID0011_RDESC_ORIG_SIZE 101

-/* Fixed report descriptor for PID 0x011 joystick */
+/* Fixed report descriptor for PID 0x011 joystick
+ * Addition:
+ * Some DragonRise PID 0x0011 variants (such as the Retro-bit Legacy16
+ * and similar controllers) feature 12 physical buttons instead of the
+ * restricted 10. Expand button report count and maximum usage to 12 (0x0C)
+ * and adjust trailing constant padding accordingly.
+ */
static const __u8 pid0011_rdesc_fixed[] = {

  0x05, 0x01,         /*  Usage Page (Desktop),           */
  0x09, 0x04,         /*  Usage (Joystick),               */
@@ -215,12 +221,12 @@ static const __u8 pid0011_rdesc_fixed[] = {
  0x95, 0x04,         /*          Report Count (4),       */
  0x81, 0x01,         /*          Input (Constant),       */
  0x25, 0x01,         /*          Logical Maximum (1),    */
- 0x95, 0x0A,         /*          Report Count (10),      */
+ 0x95, 0x0C,         /*          Report Count (12),      */
  0x05, 0x09,         /*          Usage Page (Button),    */
  0x19, 0x01,         /*          Usage Minimum (01h),    */
- 0x29, 0x0A,         /*          Usage Maximum (0Ah),    */
+ 0x29, 0x0C,         /*          Usage Maximum (0Ch),    */
  0x81, 0x02,         /*          Input (Variable),       */
- 0x95, 0x0A,         /*          Report Count (10),      */
+ 0x95, 0x08,         /*          Report Count (8),       */
  0x81, 0x01,         /*          Input (Constant),       */
  0xC0,               /*      End Collection,             */
  0xC0                /*  End Collection                  */

--
2.56.0

#1 lore raw

PATCH 1/1 HID: dragonrise - fix button count and report descriptor for PID 0x0011

Some variants of DragonRise Inc. gamepads (PID 0x0011) report 12 buttons instead of the restricted 10 defined in the static fixup descriptor, causing physical buttons mapped to bits 6 and 7 of byte 6 to be ignored by the kernel.

Expand the button Report Count and Usage Maximum to 0x0C (12) and adjust the trailing constant padding accordingly so all physical buttons are correctly reported to input/evtest.

Tested on physical hardware with the Retro-bit Legacy16 (12-button pad) and the Retro-bit Mega Drive 8-button Arcade USB (10-button pad).

---
 drivers/hid/hid-dr.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
drivers/hid/hid-dr.c +10 -4
index a1e10ee8d..e30b7fd94 100644
@@ -196,7 +196,13 @@ static inline int dr_input_configured(struct hid_device *hid,
 /* Size of the original descriptor of the PID 0x0011 joystick */
 #define PID0011_RDESC_ORIG_SIZE	101
 
-/* Fixed report descriptor for PID 0x011 joystick */
+/* Fixed report descriptor for PID 0x011 joystick
+ * Addition:
+ * Some DragonRise PID 0x0011 variants (such as the Retro-bit Legacy16
+ * and similar controllers) feature 12 physical buttons instead of the
+ * restricted 10. Expand button report count and maximum usage to 12 (0x0C)
+ * and adjust trailing constant padding accordingly.
+ */
 static const __u8 pid0011_rdesc_fixed[] = {
 	0x05, 0x01,         /*  Usage Page (Desktop),           */
 	0x09, 0x04,         /*  Usage (Joystick),               */
@@ -215,12 +221,12 @@ static const __u8 pid0011_rdesc_fixed[] = {
 	0x95, 0x04,         /*          Report Count (4),       */
 	0x81, 0x01,         /*          Input (Constant),       */
 	0x25, 0x01,         /*          Logical Maximum (1),    */
-	0x95, 0x0A,         /*          Report Count (10),      */
+	0x95, 0x0C,         /*          Report Count (12),      */
 	0x05, 0x09,         /*          Usage Page (Button),    */
 	0x19, 0x01,         /*          Usage Minimum (01h),    */
-	0x29, 0x0A,         /*          Usage Maximum (0Ah),    */
+	0x29, 0x0C,         /*          Usage Maximum (0Ch),    */
 	0x81, 0x02,         /*          Input (Variable),       */
-	0x95, 0x0A,         /*          Report Count (10),      */
+	0x95, 0x08,         /*          Report Count (8),       */
 	0x81, 0x01,         /*          Input (Constant),       */
 	0xC0,               /*      End Collection,             */
 	0xC0                /*  End Collection                  */
Signature · 1 line
2.56.0