drivers/input/ 源码目录与驱动索引

drivers/input/ 源码目录与驱动索引

1. Core 和 handlers

文件 作用
input.c Core、注册匹配、事件状态与分发
input-compat.c 32-bit compat ioctl数据转换
input-mt.c MT slot和tracking辅助
input-poller.c 通用轮询
ff-core.c / ff-memless.c 力反馈
touchscreen.c DT touchscreen属性转换
evdev.c /dev/input/eventN
mousedev.c mouseX/mice兼容接口
joydev.c jsX兼容接口
input-leds.c LED class桥接
sparse-keymap.c 稀疏扫描码映射
matrix-keymap.c 行列矩阵 keymap

2. 子目录

目录 内容
keyboard/ GPIO、ADC、matrix、PMIC等键盘
mouse/ PS/2、I2C touchpad、trackpoint
touchscreen/ I2C/SPI/USB/ADC触摸,含大量厂商树代码
joystick/ gamepad/steering/FF
tablet/ 非 HID tablet
misc/ pwrkey、rotary、uinput、switch等
serio/ PS/2/serial input transport
gameport/ legacy analog gameport
rmi4/ Synaptics RMI4
remotectl/ Rockchip红外遥控
sensors/ Rockchip厂商 sensor stack

3. RK3588 主配置

明确启用:

1
2
3
4
5
6
7
8
9
10
11
INPUT_EVDEV
KEYBOARD_ADC
KEYBOARD_GPIO
KEYBOARD_GPIO_POLLED
INPUT_TOUCHSCREEN
TOUCHSCREEN_GT1X/HYN/ELAN/...
ROCKCHIP_REMOTECTL
ROCKCHIP_REMOTECTL_PWM
INPUT_MISC
INPUT_UINPUT
INPUT_RK805_PWRKEY

明确禁用:

1
2
3
KEYBOARD_ATKBD
MOUSE_PS2
SERIO

这符合无传统 PS/2、以 DT/I2C/USB为主的 ARM板。

4. 厂商触摸代码

本目录包含 Goodix GT1X/GT9xx、FocalTech、Hynitron、Himax、Parade、Chipone等大型私有驱动树。源码存在不代表编译;必须核对其子目录 Makefile/Kconfig和最终配置。

5. UAPI

  • include/uapi/linux/input.h
  • include/uapi/linux/input-event-codes.h
  • include/uapi/linux/uinput.h
  • include/uapi/linux/joystick.h

内核 driver API主要在 include/linux/input.hinput/mt.hinput/touchscreen.h

6. 关键文档

1
2
3
4
5
6
Documentation/input/input.rst
Documentation/input/event-codes.rst
Documentation/input/multi-touch-protocol.rst
Documentation/input/event-interface.rst
Documentation/input/uinput.rst
Documentation/devicetree/bindings/input/

7. 注意

目录约 815 个文件,其中许多面向其它架构或厂商产品。RK3588相关性必须由 compatible、MFD cell、Kconfig和实际硬件共同证明。

文章互动

阅读 --

留言

0 条留言

正在加载留言…