static int dr_probe(struct hid_device *hdev, const struct hid_device_id *id) { // Send init command: report ID 0, data {0x01, 0x02} // Required for DragonRise to start sending input reports. // Set raw input report size (usually 8 or 12 bytes) // Map bytes to ABS_X, ABS_Y, ABS_RX, ABS_RY, etc. // Buttons are bit-packed across bytes 4-7 (or 8-11)
These devices all share a common (DragonRise) and various product IDs. Internally, they use a simple, undocumented HID (Human Interface Device) protocol — not standard USB HID gamepad class, but a custom, fixed-byte report format. dragonrise inc. generic usb joystick driver
// Register as a joystick input device } Internally, they use a simple, undocumented HID (Human
Today, millions of cheap USB gamepads and joysticks (many sold as “PS3/PC USB controller”) just work on Linux thanks to a 500-line driver written a decade ago. From hid-dr.c (simplified): unbranded eBay specials).
Here’s the complete story of the — a tale of budget gaming hardware, community-driven reverse engineering, and how an obscure driver became a Linux kernel staple. 1. The Hardware: DragonRise and Cheap Controllers DragonRise Inc. is a Chinese manufacturer of low-cost USB game controllers — typically PS2-style gamepads , joysticks , and fight pads sold under dozens of brand names (e.g., “Tomee”, “Retrolink”, “HuiJia”, “Mayflash”, unbranded eBay specials).