aboutsummaryrefslogtreecommitdiff
path: root/sys/modules/hid
Commit message (Collapse)AuthorAgeFilesLines
* hidwacom: Add Wacom ExpressKey Remote driverAbdelkader Boudih2026-07-122-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Wacom ExpressKey Remote (ACK-411050) is a wireless button pad with 18 programmable buttons and a touch ring, used as a companion device with Wacom tablets. It communicates via a USB wireless receiver (0x056a:0x0331) using a vendor-specific HID report (ID 0x11). This driver exposes the device via evdev: - 18 buttons: BTN_0–BTN_Z, BTN_BASE, BTN_BASE2 - Touch ring position via ABS_WHEEL (0–71; reports 0 on release) - Pad activity marker via ABS_MISC (set to 15/PAD_DEVICE_ID when any input is active, 0 when idle that matches Linux wacom driver convention) - Remote serial number via MSC_SERIAL (for userland per-remote identification) Battery level, charging state, and touch ring mode (3 LEDs, values 0–2) are exposed as per-device sysctls (dev.hidwacom.0.battery, .charging, .ring_mode) rather than overloading evdev misc codes. The ring mode sysctl is preserved across device idle periods. Protocol was decoded from USB traffic analysis and cross-referenced against the Linux wacom_remote_irq() implementation in drivers/hid/wacom_wac.c. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D56729 Discussed with: ziaee
* hrfkill: Add driver to report RFKILL button pressAymeric Wibo2026-07-092-0/+9
| | | | | | | | | | | | | | This driver only reports the RFKILL button presses. This is needed for the "airplane" key on some Framework laptops. Reviewed by: wulf, ziaee Event: Halifax Hackathon 202606 Location: vishwin@'s car Co-authored-by: Daniel Shaefer Sponsored by: Framework Computer Inc Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57838
* appleir: Add Apple IR receiver driverAbdelkader Boudih2026-04-152-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | HID driver for Apple IR receivers (USB HID, vendor 0x05ac). Supports Apple Remote and generic IR remotes using NEC protocol. Supported hardware: - Apple IR Receiver (0x8240, 0x8241, 0x8242, 0x8243, 0x1440) Apple Remote protocol (proprietary 5-byte HID reports): - Key down/repeat/battery-low detection - 17-key mapping with two-packet command support - Synthesized key-up via 125ms callout timer Generic IR remotes (NEC protocol): - Format: [0x26][0x7f][0x80][code][~code] - Checksum: code + ~code = 0xFF - Default keymap with 8 common codes - See: https://techdocs.altium.com/display/FPGA/NEC+Infrared+Transmission+Protocol Output via evdev with standard KEY_* codes. Raw HID access available at /dev/hidraw0 for custom remapping. Based on protocol reverse-engineering by James McKenzie et al. Reference: drivers/hid/hid-appleir.c (Linux) Tested on Mac Mini 2011 (0x05ac:0x8242). Differential Revision: https://reviews.freebsd.org/D55472
* hkbd(4): be more cautious & explicit about Apple vendor checkingtslight2026-03-291-1/+1
| | | | | | | | | | Apply the changes to ukbd(4) as well. Signed-off-by: tslight <tslight@pm.com> Reviewed by: wulf MFC after: 1 month Pull Request: https://github.com/freebsd/freebsd-src/pull/1998
* u2f(4): a HID driver for FIDO/U2F security keysVladimir Kondratyev2025-08-172-0/+9
| | | | | | | | | | | | | | | | | While FIDO/U2F keys were already supported by the generic uhid(4) and hidraw(4) drivers, this driver adds some additional features an does steps to tighten the security of FIDO/U2F access. - It automatically loads through devd. - Automatically enables HQ_NO_READAHEAD for FIDO/U2F devices. - Implements only miminum set of features. - Do not requires external devfs configuration to set character device permissions. - Names character device as u2f/# to make possible capsicum or any other pledge()-style sandboxing. PR: 265528 Differential Revision: https://reviews.freebsd.org/D51612
* sys/modules/hid/*: Fix standalone buildSHENG-YI HONG2024-11-2911-6/+11
| | | | | | Co-authored-by: Daniel Schaefer <dhs@frame.work> Reviewed by: imp, wulf Differential Revision: https://reviews.freebsd.org/D47830
* Remove residual blank line at start of MakefileWarner Losh2024-07-1517-17/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* sys: Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-1618-18/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* bcm5874: Add opt_usb.h for module dependencyWarner Losh2022-04-051-1/+1
| | | | Sponsored by: Netflix
* ietp(4): Driver for Elantech I2C touchpadVladimir Kondratyev2022-03-022-0/+11
| | | | | MFC after: 2 month Tested by: Matt Daw <matt.daw_AT_gmail_DOT_com>
* bcm5974: wsp(4) driver version with HID attachment.Vladimir Kondratyev2022-03-022-0/+11
| | | | | MFC after: 2 month Tested by: Greg V (Type 4 touchpads)
* Fix some modules to export more used symbolsKonstantin Belousov2021-11-184-0/+8
| | | | | | | | | and remove non-present symbols that are now reported by kmod_syms.awk. Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D32878
* hidmap: add missing opt_hid.h to module MakefileVladimir Kondratyev2021-04-141-0/+1
| | | | | Reported by: pstef MFC after: 2 weeks
* hid: add opt_hid.h to modules that use HID_DEBUGVladimir Kondratyev2021-03-033-1/+3
| | | | | | | Submitted by: Greg V <greg_AT_unrelenting_DOT_technology> Reviewed by: imp, wulf MFC after: 1 week Differential revision: https://reviews.freebsd.org/D28995
* hmt: Allow I2C sampling mode support to be compiled out.Vladimir Kondratyev2021-01-201-0/+1
|
* hms: Workaround idle mouse drift in I2C sampling mode.Vladimir Kondratyev2021-01-201-0/+1
| | | | | | | | | | | Many I2C "compatibility" mouse devices found on touchpads continue to return last report data in sampling mode after touch has been ended. That results in cursor drift. Filter out such a reports with comparing content of current report with content of previous one. Reported by: many Tested by: omatsuda, gllb (github.com) Obtained from: sysutils/iichid
* hid: Import hidmap-based drivers written by Greg VVladimir Kondratyev2021-01-074-1/+31
| | | | | | | | | | | This change includes: hpen - Generic / MS Windows compatible HID pen tablet driver. hgame - Generic game controller and joystick driver. xb360gp - Xbox360-compatible game controller driver. Submitted by: Greg V <greg_unrelenting.technology> Reviewed by: hselasky (as part of D27993)
* hid: Import hidmap and bunch of drivers based on itVladimir Kondratyev2021-01-076-1/+51
| | | | | | | | | | | | | | hidmap is a kernel module that maps HID input usages to evdev events. Following dependent drivers is included in the commit: hms - HID mouse driver. hcons - Consumer page AKA Multimedia keys driver. hsctrl - System Controls page (Power/Sleep keys) driver. ps4dshock - Sony DualShock 4 gamepad driver. Reviewed by: hselasky Differential revision: https://reviews.freebsd.org/D27993
* hidraw(4): Add HIDRAW_MAKE_UHID_ALIAS kernel optionVladimir Kondratyev2021-01-071-1/+1
| | | | | | | | | | which installs /dev/uhid# alias to hidraw character device for compatibility with some existing uhid(4) users like Firefox. As side effect it renames traditional uhid(4) driver to hidraw to make possible using of common unit number allocator. Requested by: Greg V <greg_unrelenting.technology> Reviewed by: hselasky (as part of D27992)
* hid: Import hidraw(4) - driver for access to raw HID device dataVladimir Kondratyev2021-01-072-1/+11
| | | | | | | | | | | | This driver provides raw access to HID devices through uhid(4)-compatible interface and is based on pre-8.x uhid(4) code. Unlike uhid(4) it does not take devices in to monopoly ownership and allows parallel access from other drivers. hidraw supports Linux's hidraw-compatible interface as well. Reviewed by: hselasky Differential revision: https://reviews.freebsd.org/D27992
* hid: Port ukbd to HID and attach to buildVladimir Kondratyev2021-01-072-0/+11
| | | | | Reviewed by: hselasky Differential revision: https://reviews.freebsd.org/D27991
* hid: Port multitouch hmt(4) driver to hidbus and attach to buildVladimir Kondratyev2021-01-072-1/+11
| | | | | Reviewed by: hselasky Differential revision: https://reviews.freebsd.org/D27990
* hid: Import hconf(4) - digitizer configuration top-level collection support.Vladimir Kondratyev2021-01-072-0/+12
| | | | Reviewed by: hselasky (as part of D27990)
* hid: Import quirk subsystem.Vladimir Kondratyev2021-01-072-1/+36
| | | | | | | | hidquirk(4) is derived from usb_quirk(4) and inherits all its HID-related functionality. It does not support ioctl(2) interface yet. Reviewed by: hselasky Differential revision: https://reviews.freebsd.org/D27890
* hid: Import hidbus(4)Vladimir Kondratyev2021-01-072-1/+11
| | | | | | | | | | | | | | | This driver provides support for multiple HID driver attachments to single HID transport backend. This ability existed in Net/OpenBSD (uhidev and ihidev drivers) but has never been ported to FreeBSD. Unlike Net/OpenBSD we do not use report number alone to distinct report source but we follow MS way and use a top level collection (TLC) usage index that report belongs to as a location key. The driver performs child device autodiscovery based on HID report descriptor data, proxying of HID requests from child devices to parent transport backends and broadcasting of interrupts in backward direction. Differential revision: https://reviews.freebsd.org/D27888
* hid: Import HID transport method definitions and helper functions.Vladimir Kondratyev2021-01-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Create an abstract HID interface that provides hardware independent access to HID capabilities and functions through the device tree. hid_if.m resembles existing USBHID KPI and consist of next methods: HID method USBHID variant ----------------------------------------------------------------------- hid_intr_setup usbd_transfer_setup (INTERRUPT IN xfer) hid_intr_unsetup usbd_transfer_unsetup (INTERRUPT IN xfer) hid_intr_start usbd_transfer_start (INTERRUPT IN xfer) hid_intr_stop usbd_transfer_drain (INTERRUPT IN xfer) hid_intr_poll usbd_transfer_poll (INTERRUPT IN xfer) hid_get_rdesc usbd_req_get_report_descriptor hid_read No direct analog. Not intended for common use. hid_write uhid(4) write() hid_get_report usbd_req_get_report hid_set_report usbd_req_set_report hid_set_idle usbd_req_set_idle hid_set_protocol usbd_req_set_protocol This change is part of D27888
* hid: Import functions and constants required by new subsystemVladimir Kondratyev2021-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | This does an import of quirk stubs, debugging macros from USB code and numerous usage constants used by dependent drivers. Besides, this change renames some functions to get a better matching with userland library and NetBSD/OpenBSD HID code. Namely: - Old hid_report_size() renamed to hid_report_size_max() - New hid_report_size() calculates size of given report rather than maximum size of all reports. - hid_get_data_unsigned() renamed to hid_get_udata() - hid_put_data_unsigned() renamed to hid_put_udata() Compat shim functions are provided in usbhid.h to make possible compile of legacy code unmodified after this change. Reviewed by: manu, hselasky Differential revision: https://reviews.freebsd.org/D27887
* Factor-out hardware-independent part of USB HID support to new moduleVladimir Kondratyev2021-01-072-0/+15
It will be used by the upcoming HID-over-i2C implementation. Should be no-op, except hid.ko module dependency is to be added to affected drivers. Reviewed by: hselasky, manu Differential revision: https://reviews.freebsd.org/D27867