@@ -1413,6 +1413,12 @@ config HID_KUNIT_TEST
If in doubt, say "N".
+config HID_RAKK
+ tristate "RAKK HID driver"
+ depends on HID
+ help
+ Support for the RAKK HID device.
+
endmenu
source "drivers/hid/bpf/Kconfig"
@@ -113,6 +113,7 @@ obj-$(CONFIG_HID_PLAYSTATION) += hid-playstation.o
obj-$(CONFIG_HID_PRIMAX) += hid-primax.o
obj-$(CONFIG_HID_PXRC) += hid-pxrc.o
obj-$(CONFIG_HID_RAZER) += hid-razer.o
+obj-$(CONFIG_HID_RAKK) += hid-rakk.o
obj-$(CONFIG_HID_REDRAGON) += hid-redragon.o
obj-$(CONFIG_HID_RETRODE) += hid-retrode.o
obj-$(CONFIG_HID_ROCCAT) += hid-roccat.o hid-roccat-common.o \
@@ -1520,4 +1520,7 @@
#define USB_VENDOR_ID_SIGNOTEC 0x2133
#define USB_DEVICE_ID_SIGNOTEC_VIEWSONIC_PD1011 0x0018
+#define USB_VENDOR_ID_RAKK 0x248a
+#define USB_DEVICE_ID_RAKK_DASIGX 0xfa02
+
#endif
new file mode 100644
@@ -0,0 +1,45 @@
+#include <linux/module.h>
+#include <linux/hid.h>
+
+#include "hid-ids.h"
+
+static const __u8 *rakk_report_fixup(struct hid_device *hdev, __u8 *rdesc,
+ unsigned int *rsize)
+
+{
+ static __u8 fixed_rdesc[] = {
+ 0x05, 0x01, 0x09, 0x02, 0xa1, 0x01, 0x85, 0x01,
+ 0x09, 0x01, 0xa1, 0x00, 0x05, 0x09, 0x19, 0x01,
+ 0x29, 0x05,
+ 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 0x95, 0x05,
+ 0x81, 0x02, 0x75, 0x03, 0x95, 0x01, 0x81, 0x01,
+ 0x05, 0x01, 0x09, 0x30, 0x09, 0x31, 0x16, 0x01,
+ 0x80, 0x26, 0xff, 0x7f, 0x75, 0x10, 0x95, 0x02,
+ 0x81, 0x06, 0x09, 0x38, 0x15, 0x81, 0x25, 0x7f,
+ 0x75, 0x08, 0x95, 0x01, 0x81, 0x06, 0xc0, 0xc0
+ };
+
+ if (*rsize >= sizeof(fixed_rdesc)) {
+ *rsize = sizeof(fixed_rdesc);
+ return fixed_rdesc;
+ }
+
+ return rdesc;
+}
+
+static const struct hid_device_id rakk_devices[] = {
+ { HID_USB_DEVICE(USB_VENDOR_ID_RAKK, USB_DEVICE_ID_RAKK_DASIGX) },
+ { }
+};
+MODULE_DEVICE_TABLE(hid, rakk_devices);
+
+static struct hid_driver rakk_driver = {
+ .name = "hid-rakk",
+ .id_table = rakk_devices,
+ .report_fixup = rakk_report_fixup,
+};
+module_hid_driver(rakk_driver);
+
+MODULE_AUTHOR("keenplify");
+MODULE_DESCRIPTION("Fix for Rakk Dasig X side buttons");
+MODULE_LICENSE("GPL");
\ No newline at end of file