/linux/drivers/hid/ |
H A D | Makefile | 3 # Makefile for the HID driver 5 hid-y := hid-core.o hid-input.o hid-quirks.o 6 hid-$(CONFIG_DEBUG_FS) += hid-debug.o 10 obj-$(CONFIG_HID) += hid.o 13 obj-$(CONFIG_HID_GENERIC) += hid-generic.o 15 hid-$(CONFIG_HIDRAW) += hidraw.o 17 hid-logitech-y := hid-lg.o 18 hid-logitech-$(CONFIG_LOGITECH_FF) += hid-lgff.o 19 hid-logitech-$(CONFIG_LOGIRUMBLEPAD2_FF) += hid-lg2ff.o 20 hid-logitech-$(CONFIG_LOGIG940_FF) += hid-lg3ff.o [all …]
|
H A D | Kconfig | 3 # HID driver configuration 6 bool "HID bus support" 10 This option adds core support for human interface device (HID). 15 config HID config 16 tristate "HID bus core support" 20 A human interface device (HID) is a type of computer device that 21 interacts directly with and takes input from humans. The term "HID" 22 most commonly used to refer to the USB-HID specification, but other 24 designed using HID specification (this involves certain keyboards, 25 mice, tablets, etc). This option adds the HID bus to the kernel, [all …]
|
H A D | hid-goodix-spi.c | 3 * Goodix GT7986U SPI Driver Code for HID. 9 #include <linux/hid.h> 96 struct hid_device *hid; member 103 /* lock for hid raw request operation */ 105 /* buffer used to store hid report event */ 238 * goodix_hid_parse() - hid-core .parse() callback 239 * @hid: hid device instance 245 static int goodix_hid_parse(struct hid_device *hid) in goodix_hid_parse() argument 247 struct goodix_ts_data *ts = hid->driver_data; in goodix_hid_parse() 267 error = hid_parse_report(hid, rdesc, rsize); in goodix_hid_parse() [all …]
|
H A D | hid-mf.c | 25 #include <linux/hid.h> 28 #include "hid-ids.h" 36 struct hid_device *hid = input_get_drvdata(dev); in mf_play() local 52 hid_hw_request(hid, mf->report, HID_REQ_SET_REPORT); in mf_play() 57 static int mf_init(struct hid_device *hid) in mf_init() argument 62 &hid->report_enum[HID_OUTPUT_REPORT].report_list; in mf_init() 67 struct list_head *input_ptr = &hid->inputs; in mf_init() 79 hid_err(hid, "Invalid report, this should never happen!\n"); in mf_init() 83 if (list_is_last(input_ptr, &hid->inputs)) { in mf_init() 84 hid_err(hid, "Missing input, this should never happen!\n"); in mf_init() [all …]
|
H A D | uhid.c | 3 * User-space I/O driver support for HID subsystem 15 #include <linux/hid.h> 32 /* This flag tracks whether the HID device is usable for commands from 39 * holding @devlock, it's still fine to access @hid. 47 struct hid_device *hid; member 73 ret = hid_add_device(uhid->hid); in uhid_device_add_worker() 75 hid_err(uhid->hid, "Cannot register HID device: error %d\n", ret); in uhid_device_add_worker() 80 * of using uhid->hid. in uhid_device_add_worker() 81 * Just leave uhid->hid as-is for now, and clean it up when in uhid_device_add_worker() 103 hid_warn(uhid->hid, "Output queue is full\n"); in uhid_queue() [all …]
|
H A D | hid-cmedia.c | 3 * HID driver for CMedia CM6533 audio jack controls 11 #include <linux/hid.h> 13 #include "hid-ids.h" 17 MODULE_DESCRIPTION("CM6533 HID jack controls and HS100B mute button"); 65 *CM6533 audio jack HID raw events: 87 struct hid_device *hid; member 91 static void hp_ev(struct hid_device *hid, struct cmhid *cm, int value) in hp_ev() argument 97 static int cmhid_raw_event(struct hid_device *hid, struct hid_report *report, in cmhid_raw_event() argument 100 struct cmhid *cm = hid_get_drvdata(hid); in cmhid_raw_event() 108 hp_ev(hid, cm, 0); in cmhid_raw_event() [all …]
|
H A D | hid-appleir.c | 3 * HID driver for the apple ir device 8 * Ported to HID subsystem by Benjamin Tissoires <benjamin.tissoires@gmail.com> 19 #include <linux/hid.h> 21 #include "hid-ids.h" 25 MODULE_DESCRIPTION("HID Apple IR remote controls"); 109 struct hid_device *hid; member 151 static void key_up(struct hid_device *hid, struct appleir *appleir, int key) in key_up() argument 157 static void key_down(struct hid_device *hid, struct appleir *appleir, int key) in key_down() argument 171 struct hid_device *hid = appleir->hid; in key_up_tick() local 176 key_up(hid, appleir, appleir->current_key); in key_up_tick() [all …]
|
H A D | hid-google-stadiaff.c | 8 #include <linux/hid.h> 13 #include "hid-ids.h" 18 struct hid_device *hid; member 39 hid_hw_request(stadiaff->hid, stadiaff->report, HID_REQ_SET_REPORT); in stadiaff_work() 45 struct hid_device *hid = input_get_drvdata(dev); in stadiaff_play() local 46 struct stadiaff_device *stadiaff = hid_get_drvdata(hid); in stadiaff_play() 60 static int stadiaff_init(struct hid_device *hid) in stadiaff_init() argument 68 if (list_empty(&hid->inputs)) { in stadiaff_init() 69 hid_err(hid, "no inputs found\n"); in stadiaff_init() 72 hidinput = list_entry(hid->inputs.next, struct hid_input, list); in stadiaff_init() [all …]
|
H A D | hid-input.c | 6 * HID to Linux Input mapping 20 #include <linux/hid.h> 21 #include <linux/hid-debug.h> 23 #include "hid-ids.h" 52 __u32 usage; /* the HID usage associated */ 62 * hid-input will convert this list into priorities: 67 * hid-input will then shift the priority by 8 bits to leave some space 73 * If drivers want to add fields before those, hid-input will 110 return (usage->hid & (HID_USAGE_PAGE | HID_USAGE)) == scancode; in match_scancode() 131 static struct hid_usage *hidinput_find_key(struct hid_device *hid, in hidinput_find_key() argument [all …]
|
H A D | hid-core.c | 3 * HID support for Linux 31 #include <linux/hid.h> 33 #include <linux/hid-debug.h> 36 #include "hid-ids.h" 42 #define DRIVER_DESC "HID core driver" 346 field->usage[i].hid = parser->local.usage[j]; in hid_add_field() 451 * nibble due to the common misunderstanding of HID in hid_parser_global() 717 * If the HID driver had a rdesc_fixup() callback, dev->rdesc in hid_close_report() 718 * will be allocated by hid-core and needs to be freed. in hid_close_report() 750 struct hid_device *hid = container_of(ref, struct hid_device, ref); in hiddev_free() local [all …]
|
/linux/drivers/hid/amd-sfh-hid/hid_descriptor/ |
H A D | amd_sfh_hid_report_desc.h | 3 * HID descriptor stuructures 17 0xA1, 0x00, /* HID Collection (Physical) */ 20 0x85, 1, /* HID Report ID */ 21 0x05, 0x20, /* HID usage page sensor */ 23 0x15, 0, /* HID logical MIN_8(0) */ 24 0x25, 2, /* HID logical MAX_8(2) */ 25 0x75, 8, /* HID report size(8) */ 26 0x95, 1, /* HID report count(1) */ 27 0xA1, 0x02, /* HID collection (logical) */ 31 0xB1, 0x00, /* HID feature (Data_Arr_Abs) */ [all …]
|
/linux/drivers/hid/intel-ish-hid/ |
H A D | ishtp-hid.c | 3 * ISHTP-HID glue driver. 8 #include <linux/hid.h> 11 #include "ishtp-hid.h" 14 * ishtp_hid_parse() - hid-core .parse() callback 15 * @hid: hid device instance 21 static int ishtp_hid_parse(struct hid_device *hid) in ishtp_hid_parse() argument 23 struct ishtp_hid_data *hid_data = hid->driver_data; in ishtp_hid_parse() 27 rv = hid_parse_report(hid, client_data->report_descr[hid_data->index], in ishtp_hid_parse() 36 static int ishtp_hid_start(struct hid_device *hid) in ishtp_hid_start() argument 41 static void ishtp_hid_stop(struct hid_device *hid) in ishtp_hid_stop() argument [all …]
|
/linux/Documentation/hid/ |
H A D | hid-transport.rst | 2 HID I/O Transport Drivers 5 The HID subsystem is independent of the underlying transport driver. Initially, 6 only USB was supported, but other specifications adopted the HID design and 10 1) HID Bus 13 The HID subsystem is designed as a bus. Any I/O subsystem may provide HID 14 devices and register them with the HID bus. HID core then loads generic device 16 transport and device setup/management. HID core is responsible for 36 | HID Core | 50 - Transport: USB-HID, I2C-HID, BT-HIDP 52 Everything below "HID Core" is simplified in this graph as it is only of [all …]
|
H A D | hidintro.rst | 4 Introduction to HID report descriptors 7 This chapter is meant to give a broad overview of what HID report 9 with HID devices that are not working well with Linux. 24 HID stands for Human Interface Device, and can be whatever device you 28 Many HID devices work out the box, even if their hardware is different. 35 This is because modern HID devices do advertise their capabilities 36 through the *HID report descriptor*, a fixed set of bytes describing 37 exactly what *HID reports* may be sent between the device and the host 39 a HID Report Descriptor may specify that "in a report with ID 3 the 42 The HID report itself then merely carries the actual data values [all …]
|
H A D | amd-sfh-hid.rst | 7 The solution is working well on several OEM products. AMD SFH uses HID over PCIe bus. 9 the HID reports are generated as part of the kernel driver. 17 | HID User Space Applications | 22 | HID Core | 26 | AMD HID Transport | 30 | AMD HID Client | 31 | with HID Report Generator| 45 AMD HID Transport Layer 49 sensor data. The layer, which binds each device (AMD SFH HID driver) identifies the device type and 50 registers with the HID core. Transport layer attaches a constant "struct hid_ll_driver" object with [all …]
|
H A D | hid-bpf.rst | 4 HID-BPF 7 HID is a standard protocol for input devices but some devices may require 10 existing HID interfaces. 17 When (and why) to use HID-BPF 20 There are several use cases when using HID-BPF is better 30 With HID-BPF, we can apply this filtering in the kernel directly so userspace 38 HID-BPF allows the userspace program to load the program itself, ensuring we 44 In the HID tree, half of the drivers only fix one key or one byte 61 channels of communication that our HID and input stack do not support. 70 The kernel has a relatively static mapping of HID items to evdev bits. [all …]
|
/linux/drivers/hid/amd-sfh-hid/ |
H A D | amd_sfh_hid.c | 10 #include <linux/hid.h> 20 * amdtp_hid_parse() - hid-core .parse() callback 21 * @hid: hid device instance 27 static int amdtp_hid_parse(struct hid_device *hid) in amdtp_hid_parse() argument 29 struct amdtp_hid_data *hid_data = hid->driver_data; in amdtp_hid_parse() 32 return hid_parse_report(hid, cli_data->report_descr[hid_data->index], in amdtp_hid_parse() 37 static int amdtp_hid_start(struct hid_device *hid) in amdtp_hid_start() argument 42 static void amdtp_hid_stop(struct hid_device *hid) in amdtp_hid_stop() argument 46 static int amdtp_hid_open(struct hid_device *hid) in amdtp_hid_open() argument 51 static void amdtp_hid_close(struct hid_device *hid) in amdtp_hid_close() argument [all …]
|
/linux/drivers/staging/greybus/ |
H A D | hid.c | 3 * HID class driver for the Greybus. 10 #include <linux/hid.h> 17 /* Greybus HID device's structure */ 22 struct hid_device *hid; member 146 hid_input_report(ghid->hid, HID_INPUT_REPORT, in gb_hid_request_handler() 158 static void gb_hid_find_max_report(struct hid_device *hid, unsigned int type, in gb_hid_find_max_report() argument 164 list_for_each_entry(report, &hid->report_enum[type].report_list, list) { in gb_hid_find_max_report() 200 * hid->driver_lock is held as we are in probe function, in gb_hid_init_report() 204 hid_report_raw_event(ghid->hid, report->type, ghid->inbuf, size, 1); in gb_hid_init_report() 209 struct hid_device *hid = ghid->hid; in gb_hid_init_reports() local [all …]
|
/linux/drivers/hid/surface-hid/ |
H A D | surface_hid_core.c | 3 * Common/core components for the Surface System Aggregator Module (SSAM) HID 4 * transport driver. Provides support for integrated HID devices on Microsoft 11 #include <linux/hid.h> 52 dev_err(shid->dev, "unexpected HID descriptor length: got %u, expected %zu\n", in surface_hid_load_hid_descriptor() 58 dev_err(shid->dev, "unexpected HID descriptor type: got %#04x, expected %#04x\n", in surface_hid_load_hid_descriptor() 102 static int surface_hid_start(struct hid_device *hid) in surface_hid_start() argument 104 struct surface_hid_device *shid = hid->driver_data; in surface_hid_start() 109 static void surface_hid_stop(struct hid_device *hid) in surface_hid_stop() argument 111 struct surface_hid_device *shid = hid->driver_data; in surface_hid_stop() 116 * also includes unregistration of HID events, so we need to check this in surface_hid_stop() [all …]
|
/linux/drivers/hid/bpf/progs/ |
H A D | README | 1 # HID-BPF programs 9 They should be loaded in the kernel by `udev-hid-bpf`: 11 https://gitlab.freedesktop.org/libevdev/udev-hid-bpf 14 "upstream" them, but also this way we can test them thanks to the HID 17 Once a .bpf.c file is accepted here, it is duplicated in `udev-hid-bpf` 20 land in distributions when they update `udev-hid-bpf` 30 Just run `sudo udev-hid-bpf install ./my-awesome-fix.bpf.o` 34 - copy the `.bpf.o` you want in `/etc/udev-hid-bpf/` 37 The following should do the trick (assuming udev-hid-bpf is available in 41 $> cp xppen-ArtistPro16Gen2.bpf.o /etc/udev-hid-bpf/ [all …]
|
/linux/drivers/hid/usbhid/ |
H A D | hiddev.c | 6 * HID char devices, giving access to raw HID device events. 22 #include <linux/hid.h> 56 hiddev_lookup_report(struct hid_device *hid, struct hiddev_report_info *rinfo) in hiddev_lookup_report() argument 68 report_enum = hid->report_enum + in hiddev_lookup_report() 109 hiddev_lookup_usage(struct hid_device *hid, struct hiddev_usage_ref *uref) in hiddev_lookup_usage() argument 120 report_enum = hid->report_enum + in hiddev_lookup_usage() 127 if (field->usage[j].hid == uref->usage_code) { in hiddev_lookup_usage() 140 static void hiddev_send_event(struct hid_device *hid, in hiddev_send_event() argument 143 struct hiddev *hiddev = hid->hiddev; in hiddev_send_event() 163 * This is where hid.c calls into hiddev to pass an event that occurred over [all …]
|
H A D | hid-pidff.c | 3 * Force feedback driver for USB HID PID compliant devices 19 #include <linux/hid.h> 145 struct hid_device *hid; member 250 hid_dbg(pidff->hid, "attack %u => %d\n", in pidff_set_envelope_report() 254 hid_hw_request(pidff->hid, pidff->reports[PID_SET_ENVELOPE], in pidff_set_envelope_report() 281 hid_hw_request(pidff->hid, pidff->reports[PID_SET_CONSTANT], in pidff_set_constant_force_report() 316 hid_hw_request(pidff->hid, pidff->reports[PID_SET_EFFECT], in pidff_set_effect_report() 348 hid_hw_request(pidff->hid, pidff->reports[PID_SET_PERIODIC], in pidff_set_periodic_report() 390 hid_hw_request(pidff->hid, pidff->reports[PID_SET_CONDITION], in pidff_set_condition_report() 431 hid_hw_request(pidff->hid, pidff->reports[PID_SET_RAMP], in pidff_set_ramp_force_report() [all …]
|
/linux/drivers/hid/i2c-hid/ |
H A D | Kconfig | 3 tristate "I2C HID support" 5 depends on I2C && INPUT && HID 10 tristate "HID over I2C transport layer ACPI driver" 16 other HID based devices which is connected to your computer via I2C. 22 will be called i2c-hid-acpi. It will also build/depend on the 23 module i2c-hid. 26 tristate "HID over I2C transport layer Open Firmware driver" 28 # (board-file) instantiated "hid-over-i2c" type i2c-clients. 33 other HID based devices which is connected to your computer via I2C. 35 well as binding to manually (board-file) instantiated i2c-hid-clients. [all …]
|
H A D | i2c-hid-core.c | 2 * HID over I2C protocol implementation 8 * This code is partly based on "USB HID support for Linux": 37 #include <linux/hid.h> 43 #include "../hid-ids.h" 44 #include "i2c-hid.h" 94 struct hid_device *hid; /* pointer to corresponding HID dev */ member 95 struct i2c_hid_desc hdesc; /* the HID Descriptor */ 97 * register of the HID 150 * i2c_hid_lookup_quirk: return any quirks associated with a I2C HID device 330 * @ihid: the i2c hid device [all …]
|
/linux/include/linux/ |
H A D | hid_bpf.h | 9 #include <uapi/linux/hid.h> 14 * The following is the user facing HID BPF API. 21 * struct hid_bpf_ctx - User accessible data for all HID programs 26 * @hid: the &struct hid_device representing the device itself 30 * by the HID program. 44 * ``hid`` and ``allocated_size`` are read-only, ``size`` and ``retval`` are read-write. 47 struct hid_device *hid; member 56 * Below is HID internal 74 int (*hid_input_report)(struct hid_device *hid, enum hid_report_type type, 84 * struct hid_bpf_ops - A BPF struct_ops of callbacks allowing to attach HID-BPF [all …]
|