linux/Documentation/hid
Dmitry Torokhov 225c308128 HID: add documentation and Coccinelle script for FF registration race
HID drivers that rely on the HID core to register input devices must
ensure that all private data and capabilities (like force-feedback) are
fully initialized before registration.

When hid_hw_start() is called with HID_CONNECT_HIDINPUT, the input
device is registered immediately. This is racy if the driver attempts to
augment the input device in probe() after starting the hardware.

The correct way to handle this is to use the .input_configured()
callback.

Add documentation and a Coccinelle script to detect and prevent this
anti-pattern.

Assisted-by: Gemini:gemini-3.1-pro
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
2026-08-14 14:46:20 +02:00
..
amd-sfh-hid.rst Documentation: HID: amd-sfh-hid editing & corrections 2021-01-04 11:50:38 +01:00
hid-alps.rst Documentation: hid-alps: Format DataByte* subsection headings 2025-11-18 17:53:10 +01:00
hid-bpf.rst HID: bpf: allow hid_device_event hooks to inject input reports on self 2024-06-27 11:00:48 +02:00
hid-sensor.rst Documentation: HID: hid-sensor editing & corrections 2021-01-04 11:50:38 +01:00
hid-transport.rst Documentation: HID: hid-transport editing & corrections 2021-01-04 11:50:39 +01:00
hiddev.rst Documentation: hid: correct spelling 2023-02-06 15:00:22 +01:00
hidintro.rst HID: add documentation and Coccinelle script for FF registration race 2026-08-14 14:46:20 +02:00
hidraw.rst Documentation: hid: correct spelling 2023-02-06 15:00:22 +01:00
hidreport-parsing.rst HID: Add introduction about HID for non-kernel programmers 2023-08-07 13:24:36 +02:00
index.rst HID: THC: Add documentation 2025-01-09 10:14:14 +01:00
intel-ish-hid.rst Docs: hid: intel-ish-hid: make long URL usable 2026-04-09 08:40:41 -06:00
intel-thc-hid.rst HID: intel-thc-hid: Separate max input size control conditional list 2025-06-20 08:55:52 +02:00
uhid.rst Documentation: HID: uhid editing & corrections 2021-01-04 11:50:39 +01:00