// SPDX-License-Identifier: GPL-2.0-or-later
/*
* HID driver for Keytouch devices not fully compliant with HID standard
*
* Copyright (c) 2011 Jiri Kosina
*/
/*
*/
#include <linux/device.h>
#include <linux/hid.h>
#include <linux/module.h>
#include "hid-ids.h"
/* Replace the broken report descriptor of this device with rather
* a default one */
static const __u8 keytouch_fixed_rdesc[] = {
0 x05, 0 x01, 0 x09, 0 x06, 0 xa1, 0 x01, 0 x05, 0 x07, 0 x19, 0 xe0, 0 x29, 0 xe7, 0 x15,
0 x00, 0 x25, 0 x01, 0 x75, 0 x01, 0 x95, 0 x08, 0 x81, 0 x02, 0 x95, 0 x01, 0 x75, 0 x08,
0 x81, 0 x01, 0 x95, 0 x03, 0 x75, 0 x01, 0 x05, 0 x08, 0 x19, 0 x01, 0 x29, 0 x03, 0 x91,
0 x02, 0 x95, 0 x05, 0 x75, 0 x01, 0 x91, 0 x01, 0 x95, 0 x06, 0 x75, 0 x08, 0 x15, 0 x00,
0 x26, 0 xff, 0 x00, 0 x05, 0 x07, 0 x19, 0 x00, 0 x2a, 0 xff, 0 x00, 0 x81, 0 x00, 0 xc0
};
static const __u8 *keytouch_report_fixup(struct hid_device *hdev, __u8 *rdesc,
unsigned int *rsize)
{
hid_info(hdev, "fixing up Keytouch IEC report descriptor\n" );
*rsize = sizeof (keytouch_fixed_rdesc);
return keytouch_fixed_rdesc;
}
static const struct hid_device_id keytouch_devices[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_KEYTOUCH, USB_DEVICE_ID_KEYTOUCH_IEC) },
{ }
};
MODULE_DEVICE_TABLE(hid, keytouch_devices);
static struct hid_driver keytouch_driver = {
.name = "keytouch" ,
.id_table = keytouch_devices,
.report_fixup = keytouch_report_fixup,
};
module_hid_driver(keytouch_driver);
MODULE_DESCRIPTION("HID driver for Keytouch devices not fully compliant with HID standard" );
MODULE_LICENSE("GPL" );
MODULE_AUTHOR("Jiri Kosina" );
Messung V0.5 in Prozent C=93 H=95 G=93
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet am 2026-06-07)
¤
*© Formatika GbR, Deutschland