Linux-usb触摸板去除鼠标箭头

usb触摸板会同时加载hid-generic.c和hid-multitouch.c驱动

复制代码
[  213.602561] usb 4-1: new full-speed USB device number 2 using ohci-platform
[  213.834953] usb 4-1: New USB device found, idVendor=6615, idProduct=108c, bcdDevice= 1.30
[  213.835048] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  213.835081] usb 4-1: Product: USB TouchScreen
[  213.835108] usb 4-1: Manufacturer: Beijing IRTOUCHSYSTEMS Co.,Ltd.
[  213.835136] usb 4-1: SerialNumber: 788B669E0753
[  213.846822] input: Beijing IRTOUCHSYSTEMS Co.,Ltd. USB TouchScreen as /devices/platform/fd8c0000.usb/usb4/4-1/4-1:1.0/0003:6615:108C.0001/input/input4
[  213.902890] hid-generic 0003:6615:108C.0001: input,hidraw0: USB HID v1.11 Mouse [Beijing IRTOUCHSYSTEMS Co.,Ltd. USB TouchScreen] on usb-fd8c0000.usb-1/input0
[  213.914431] input: Beijing IRTOUCHSYSTEMS Co.,Ltd. USB TouchScreen as /devices/platform/fd8c0000.usb/usb4/4-1/4-1:1.1/0003:6615:108C.0002/input/input5
[  213.971215] hid-multitouch 0003:6615:108C.0002: input,hiddev96,hidraw1: USB HID v1.11 Device [Beijing IRTOUCHSYSTEMS Co.,Ltd. USB TouchScreen] on usb-fd8c0000.usb-1/input1

我们只需要让其加载hid-multitouch.c驱动即可

evtest可以看到生成了event3和event4这2个输入事件

复制代码
[root@ok3568:/]# evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:      rk805 pwrkey
/dev/input/event1:      adc-keys
/dev/input/event2:      rk-headset
/dev/input/event3:      Beijing IRTOUCHSYSTEMS Co.,Ltd. USB TouchScreen
/dev/input/event4:      Beijing IRTOUCHSYSTEMS Co.,Ltd. USB TouchScreen

lsusb查看usb触摸板的vid和pid

复制代码
[root@ok3568:/]# lsusb
Bus 004 Device 002: ID 6615:108c

hid-generic.c驱动屏蔽掉该设备

复制代码
diff --git a/drivers/hid/hid-generic.c b/drivers/hid/hid-generic.c
index 3b6eccbc2..2588e5a6b 100644
--- a/drivers/hid/hid-generic.c
+++ b/drivers/hid/hid-generic.c
@@ -53,6 +53,9 @@ static bool hid_generic_match(struct hid_device *hdev,
        if (bus_for_each_drv(&hid_bus_type, NULL, hdev, __check_hid_generic))
                return false;
 
+       if (hdev->vendor == 0x6615 && hdev->product == 0x108c)
+               return false;
+
        return true;
 }
相关推荐
虎头金猫2 分钟前
从杂乱到有序,Paperless-ngx 加个cpolar更好用
linux·运维·人工智能·docker·开源·beautifulsoup·pandas
赖small强12 分钟前
【Linux 内存管理】Linux 低内存平台文件缓存导致的虚假内存不足问题分析与解决方案
linux·缓存·oom·水位线
慾玄18 分钟前
ce复习--Chrony服务器
linux
wifi chicken25 分钟前
Linux Wlan无线网络开发之DHCP预留功能 实操demo
linux·运维·服务器
代码游侠27 分钟前
复习——线性表
linux·c语言·数据结构·学习·算法
DeeplyMind28 分钟前
第5章:并发与竞态条件-12:Locking Traps
linux·驱动开发·ldd
dragoooon3431 分钟前
[Linux网络基础——Lesson11.「NAT & 代理服务 & 内网穿透」]
linux·网络·智能路由器
dragoooon3442 分钟前
[Linux网络基础——Lesson10.「数据链路层 & ARP 具体过程 & ARP 欺骗」]
linux·网络·网络协议
Dovis(誓平步青云)44 分钟前
《Linux 网络实战手册:从 TCP/IP 协议栈到 UDP网络通信》
linux·网络·tcp/ip
国科安芯1 小时前
AS32A601型MCU芯片flash模块的擦除和编程
java·linux·前端·单片机·嵌入式硬件·fpga开发·安全性测试