History log of /freebsd-current/sys/dev/hid/hidbus.c
Revision Date Author Comments
# 3f795763 05-Jun-2024 Mark Johnston <markj@FreeBSD.org>

hidbus: Use device_set_descf()

No functional change intended.

MFC after: 1 week


# 4eb82e65 05-Jun-2024 Zhenlei Huang <zlei@FreeBSD.org>

hidbus(4): Fix wrong assertion of bus

Reviewed by: wulf
Fixes: 4151ac9f1292 hidbus(4): Use generic hid methods to ...
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D45496


# fdafd315 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

sys: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix


# 64fbda90 19-Aug-2023 Val Packett <val@packett.cool>

Add atopcase, the Apple HID over SPI input driver

The driver provides support for Human Interface Devices (HID) on
Serial Peripheral Interface (SPI) buses on Apple Intel Macs
produced in 2015-2018.

The driver appears to work more stable after installation of Darwin OSI
in acpi(4) driver.
To install Darwin OSI insert following lines into /boot/loader.conf:

hw.acpi.install_interface="Darwin"
hw.acpi.remove_interface="Windows 2009, Windows 2012"

Reviewed by: wulf
Differential revision: https://reviews.freebsd.org/D39863


# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 4151ac9f 03-Aug-2023 Vladimir Kondratyev <wulf@FreeBSD.org>

hidbus(4): Use generic hid methods to start and stop interrupts


# 4b171281 03-Aug-2023 Vladimir Kondratyev <wulf@FreeBSD.org>

hid: Add child device parameter to HID methods

Some devices like Apple HID-over-SPI may contain more than one report
descriptors necessitating creation of multiple hidbus children.
Add indentificator of child devices to distinct them.
No functional changes intended.

Differential Revision: https://reviews.freebsd.org/D41246


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix


# e4d3f1e4 05-Feb-2023 Yuri <yuri@aetern.org>

hv_hid: Hyper-V HID driver

Hyper-V HID driver using hidbus/hms.

Reviewed by: wulf
MFC after: 1 week
PR: 221074
Differential revision: https://reviews.freebsd.org/D38140


# c019a169 23-Jun-2022 Hans Petter Selasky <hselasky@FreeBSD.org>

hidbus(4): Align refcount checks for hidbus_intr_start() and hidbus_intr_stop().

No functional change intended.

Discussed with: wulf @
MFC after: 1 week
Sponsored by: NVIDIA Networking


# 7eeede15 06-May-2022 John Baldwin <jhb@FreeBSD.org>

hid: Remove unused devclass arguments to DRIVER_MODULE.


# e9d92100 21-Apr-2022 John Baldwin <jhb@FreeBSD.org>

hidbus: Use devclass_find to lookup the devclass for hidbus.

Reviewed by: wulf, imp
Differential Revision: https://reviews.freebsd.org/D35000


# 5f47c5a3 02-Mar-2022 Vladimir Kondratyev <wulf@FreeBSD.org>

hid: Add hid_ioctl method to HID interface

hid_ioctl method executes arbitrary transport backend command.
Format of the command is defined by hardware transport driver.

It is intended to assist HID device drivers to execute non-HID commands
on hybrid devices like Elan and Apple touchpads which can be switched
between HID and proprietary modes.

MFC after: 2 month


# d14bc723 09-Dec-2021 Warner Losh <imp@FreeBSD.org>

newbus: add bus_topo_assert

Add bus_topo_assert() and implmement it as GIANT_REQUIRED for the
moment. This will allow us to change more easily to a newbus-specific
lock int he future.

Sponsored by: Netflix
Reviewed by: wulf, mav, jhb
Differential Revision: https://reviews.freebsd.org/D31833


# d51e4376 02-Sep-2021 Vladimir Kondratyev <wulf@FreeBSD.org>

hidbus(4): Add routine to check presence of collection of given usage

MFC after: 2 week


# ddfc9c4c 22-Jun-2021 Warner Losh <imp@FreeBSD.org>

newbus: Move from bus_child_{pnpinfo,location}_src to bus_child_{pnpinfo,location} with sbuf

Now that the upper layers all go through a layer to tie into these
information functions that translates an sbuf into char * and len. The
current interface suffers issues of what to do in cases of truncation,
etc. Instead, migrate all these functions to using struct sbuf and these
issues go away. The caller is also in charge of any memory allocation
and/or expansion that's needed during this process.

Create a bus_generic_child_{pnpinfo,location} and make it default. It
just returns success. This is for those busses that have no information
for these items. Migrate the now-empty routines to using this as
appropriate.

Document these new interfaces with man pages, and oversight from before.

Reviewed by: jhb, bcr
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D29937


# 9aa0e5af 28-May-2021 Vladimir Kondratyev <wulf@FreeBSD.org>

usbhid(4): Add second set of USB transfers to work in polled mode.

The second set of USB transfer is requested by hkbd(4) and
should improve HID keyboard handling in kdb and panic contexts.

MFC after: 1 week
Reviewed by: hselasky
Differential revision: https://reviews.freebsd.org/D30486


# 01f2e864 08-Oct-2020 Vladimir Kondratyev <wulf@FreeBSD.org>

hid: Import usbhid - USB transport backend for HID subsystem.

This change implements hid_if.m methods for HID-over-USB protocol [1].

Also, this change adds USBHID_ENABLED kernel option which changes
device_probe() priority and adds/removes PnP records to prefer usbhid
over ums, ukbd, wmt and other USB HID device drivers and vice-versa.

The module is based on uhid(4) driver. It is disabled by default for
now due to conflicts with existing USB HID drivers.

[1] https://www.usb.org/sites/default/files/hid1_11.pdf

Reviewed by: hselasky
Differential revision: https://reviews.freebsd.org/D27893


# b1f1b07f 06-Oct-2020 Vladimir Kondratyev <wulf@FreeBSD.org>

hid: Import iichid - I2C transport backend for HID subsystem

This implements hid_if.m methods for HID-over-I2C protocol [1].

Following kernel options are added:

IICHID_SAMPLING - Enable support for a sampling mode as interrupt
resource acquisition is not always possible in a case
of GPIO interrupts.
IICHID_DEBUG - Enable debug output.

The module is based on prior Marc Priggemeyer work (D16698).

[1] http://download.microsoft.com/download/7/d/d/7dd44bb7-2a7a-4505-ac1c-7227d3d96d5b/hid-over-i2c-protocol-spec-v1-0.docx

Differential revision: https://reviews.freebsd.org/D27892


# 2b4464b0 08-Oct-2020 Vladimir Kondratyev <wulf@FreeBSD.org>

hid: Import hidbus(4)

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