摘要: 1. proc/devices下创建设备 创建字符设备大致有两种方式,但是归根结底只有一种方式 方式1:使用register_chrdev来注册,但这种方式弊端非常明显,会将次设备号为0 255的设备全部占用,即该主设备号的所有字符设备只能对应一个fops 方式2:主设备号为major,指定次设备号 阅读全文
posted @ 2018-01-18 18:02 __千里之行 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 该篇分析通用的input handler:evdev.c 源码: android-5.0.2\linux-3.0.86\drivers\input\Evdev.c功能: 创建/dev/input/eventx的字符设备供上层使用 源码分析: 往input子系统注册input_handler 事件上报 阅读全文
posted @ 2018-01-18 16:25 __千里之行 阅读(264) 评论(0) 推荐(0) 编辑
摘要: 源码: android-5.0.2\linux-3.0.86\drivers\input\touchscreen\Ft5x06_ts.c 功能: input device驱动code,该篇只阐述input device驱动框架,其他文章将描述input子系统 1:注册input_device 2:上 阅读全文
posted @ 2018-01-18 15:54 __千里之行 阅读(342) 评论(0) 推荐(0) 编辑