Correct contact people(s) and Linux branch for my HID driver?
Hi,
I have witten following driver for bluetooth HID device iRig BlueTurn. To whom should I contact? If it is accepted, to what git Linux kernel branch should I it check-in?
Regards,
Mikko Laanti
// SPDX-License-Identifier: GPL-2.0+
/*
* HID driver for IK Multimedia iRig BlueTurn devices *
* Copyright (c) 2026 Mikko Laanti <[email protected]> */
#include <linux/hid.h>
#include <linux/module.h>
#include "hid-ids.h"
MODULE_AUTHOR("Mikko Laanti <[email protected]"); MODULE_DESCRIPTION("iRig BlueTurn devices"); MODULE_LICENSE("GPL");
/* Changes in Makefile
obj-$(CONFIG_HID_IRIG_BLUETURN) += hid-irig-blueturn.o
* Changes in Kconfig
config HID_IRIG_BLUETURN
tristate "iRig BlueTurn devices"
help
Support for iRig BlueTurn devices, which are not fully
compliant with the
HID standard.
hid-irig-blueturn
To compile this driver as a module, choose M here: the module will be called hid-irig-blueturn.ko.
* Changes in hid-ids.h
#define USB_VENDOR_ID_IK_MULTIMEDIA 0x0214
#define USB_VENDOR_ID_IK_MULTIMEDIA_IRIG_BLUETURN 0x0002
*/
/*
* The iRig BlueTurn (Page turner) foot controlled bluetooth keyboard
uses unnumbered keyboard messages
* iRig BlueTurn can be configured to three possible configurations for
its two buttons:
* 1. ARROW_UP/ARROW_DOWN
* 2. PAGE_UP/PAGE_DOWN
* 3. ARROW_LEFT/ARROW_RIGHT
* E.g. A compliant bluetooth keyboard sends Up Arrow: 01 00 00 52 00
00 00 00 00 (first data byte means it is "numbered")
* IK multimedia iRig BlueTurn sends Up Arrow: 00 00 00 52 00
00 00 00
* Without this driver and iRig BlueTurn connected, you'll get system
log dmesg error:
* "Event data for report 0 was too short (8 vs 7)" (hid-core.c:hid_report_raw_event)
*/
static int irig_blueturn_raw_event(struct hid_device *hdev, struct hid_report *report,
u8 *data, int size)
{
/* iRig Blueturn always sends unnumbered 8 bytes i.e. 64 bitsdata reports.
* hid-core.c: hid_report_raw_event() decreases data size by
one because keyboard messages should be numbered.
* We decrease report size here so that it will pass data size
test in hid-core.c:hid_report_raw_event()
* Right way would be to adjust data so that it looks exactly
like compliant keyboard, but we cannot set
* the size because it has been passed to thisirig_blueturn_raw_event as a value, not as a reference.
* So we have to decrease report size here so that it will
pass data size test in hid-core.c:hid_report_raw_event()
*/
int ret = 0;
if (report->size == 64) // 64 bits length
{
report->size = 56; // decrease it to 56 bit
}
return ret;
}static const struct hid_device_id irig_blueturn_id_table[] = {
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_IK_MULTIMEDIA,
USB_VENDOR_ID_IK_MULTIMEDIA_IRIG_BLUETURN) },
{ }
};MODULE_DEVICE_TABLE(hid, irig_blueturn_id_table);
static struct hid_driver irig_blueturn_driver = {
.name = "irig blueturn",
.id_table = irig_blueturn_id_table,
.raw_event = irig_blueturn_raw_event,
};
module_hid_driver(irig_blueturn_driver);
Hello Mikko,
Quoted 6 lines · Mikko Laanti
Hi,
I have witten following driver for bluetooth HID device iRig BlueTurn.
To whom should I contact? If it is accepted, to what git Linux kernel branch should I it check-in?
The way to submit patches to the kernel is explained at:
https://www.kernel.org/doc/html/v7.0/process/submitting-patches.html
What you'll find, once you've put your patch in a commit, generated that patch and ran the "scripts/get_maintainer.pl" is that all drivers under drivers/hid get reviewed on the linux-input@ mailing-list.
You can find how to post to it at:
https://subspace.kernel.org/vger.kernel.org.html
Cheers
Quoted 109 lines
Regards,
Mikko Laanti
// SPDX-License-Identifier: GPL-2.0+
/*
* HID driver for IK Multimedia iRig BlueTurn devices *
* Copyright (c) 2026 Mikko Laanti <[email protected]> */#include <
linux/hid.h>
#include <linux/module.h>#include "
hid-ids.h"
MODULE_AUTHOR("Mikko Laanti <[email protected]");MODULE_DESCRIPTION("iRig BlueTurn devices");MODULE_LICENSE("GPL");/* Changes in
Makefile
obj-$(CONFIG_HID_IRIG_BLUETURN) += hid-irig-blueturn.o* Changes in
Kconfig
configHID_IRIG_BLUETURN
tristate "iRig BlueTurn devices"
help
Support for iRig BlueTurn devices, which are not fully
compliant with the
HID standard.
hid-irig-blueturnTo compile this driver as a module, choose M here: the
module
will be called hid-irig-blueturn.ko.* Changes in
hid-ids.h
#defineUSB_VENDOR_ID_IK_MULTIMEDIA0x0214
#defineUSB_VENDOR_ID_IK_MULTIMEDIA_IRIG_BLUETURN0x0002
*//*
* The iRig BlueTurn (Page turner) foot controlled bluetooth keyboard uses unnumbered keyboard messages
* iRig BlueTurn can be configured to three possible configurations for
its two buttons:
* 1. ARROW_UP/ARROW_DOWN
* 2. PAGE_UP/PAGE_DOWN
* 3. ARROW_LEFT/ARROW_RIGHT
* E.g. A compliant bluetooth keyboard sends Up Arrow: 01 00 00 52 00
00 00 00 00 (first data byte means it is "numbered")
* IK multimedia iRig BlueTurn sends Up Arrow: 00 00 00 52 00
00 00 00
* Without this driver and iRig BlueTurn connected, you'll get system log dmesg error:
* "Event data for report 0 was too short (8 vs 7)" (hid-core.c:hid_report_raw_event)
*/static int irig_blueturn_raw_event(struct
hid_device*hdev, structhid_report*report,
u8 *data, int size){ /* iRig Blueturn always sends unnumbered 8 bytes i.e. 64bits
data reports.
*hid-core.c:hid_report_raw_event()decreases data size by
one because keyboard messages should be numbered.
* We decrease report size here so that it will pass data
size
test in hid-core.c:hid_report_raw_event()
* Right way would be to adjust data so that it looks
exactly
like compliant keyboard, but we cannot set
* the size because it has been passed to thisirig_blueturn_raw_eventas a value, not as a reference.
* So we have to decrease report size here so that it will
pass data size test in hid-core.c:hid_report_raw_event()*/ int ret = 0; if (report->size == 64) // 64 bits length { report->size = 56; // decrease it to 56 bit } return ret; }static const struct
hid_device_idirig_blueturn_id_table[] = {
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_IK_MULTIMEDIA,
USB_VENDOR_ID_IK_MULTIMEDIA_IRIG_BLUETURN)
},{ } };
MODULE_DEVICE_TABLE(hid, irig_blueturn_id_table);static struct
hid_driveririg_blueturn_driver= {
.name = "irig blueturn",
.id_table =irig_blueturn_id_table,
.raw_event =irig_blueturn_raw_event,
};
module_hid_driver(irig_blueturn_driver);