RFC/RFT: Input - sysfs integration
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest26 of 28 patches 27 repliesIn review
26 of 28 patches are in this archive. The cover letter announces 28.
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/28 | I2O: remove class interfacedrivers/ | +122 | 2 replies | |
| 2/28 | I2O: remove i2o_device_classdrivers/ drivers/ drivers/ +2 more | +17 | 1 reply | |
| 3/28 | Driver core: allow nesting classesdrivers/ include/ | +8 | 0 replies | |
| 4/28 | Driver core: make parent class define subsystemdrivers/ | +12 | 0 replies | |
| 5/28 | Driver core: pass interface to class intreface methodsdrivers/ drivers/ drivers/ +3 more | +22 | 0 replies | |
| 6/28 | Driver core: send hotplug event before adding class interfacesdrivers/ | +2 | 0 replies | |
| 7/28 | Input: kill devfs referencesdrivers/ drivers/ drivers/ +2 more | +1 | 0 replies | |
| 8/28 | Input: prepare to sysfs integrationdrivers/ include/ | +95 | 8 replies | |
| 9/28 | Input: convert net/bluetooth to dynamic input_dev allocationnet/ | +8 | 10 replies | |
| 10/28 | Input: convert drivers/macintosh to dynamic input_dev allocationdrivers/ drivers/ | +139 | 0 replies | |
| 11/28 | Input: convert konicawc to dynamic input_dev allocationdrivers/ | +61 | 0 replies | |
| 12/28 | Input: convert onetouch to dynamic input_dev allocationdrivers/ | +53 | 0 replies | |
| 13/28 | drivers/input/mouse: convert to dynamic input_dev allocationdrivers/ drivers/ drivers/ +12 more | +370 | 0 replies | |
| 14/28 | drivers/input/keyboard: convert to dynamic input_dev allocationdrivers/ drivers/ drivers/ +6 more | +450 | 0 replies | |
| 15/28 | drivers/input/touchscreen: convert to dynamic input_dev allocationdrivers/ drivers/ drivers/ +4 more | +285 | 0 replies | |
| 17/28 | Input: convert ucb1x00-ts to dynamic input_dev allocationdrivers/ | +25 | 0 replies | |
| 18/28 | Input: convert sound/ppc/beep to dynamic input_dev allocationsound/ | +38 | 0 replies | |
| 19/28 | Input: convert sonypi to dynamic input_dev allocationdrivers/ | +53 | 0 replies | |
| 20/28 | Input: convert driver/input/misc to dynamic input_dev allocationdrivers/ drivers/ drivers/ | +59 | 0 replies | |
| 22/28 | drivers/media: convert to dynamic input_dev allocationdrivers/ drivers/ drivers/ +10 more | +268 | 0 replies | |
| 23/28 | Input: show sysfs path in /proc/bus/input/devicesdrivers/ | +6 | 0 replies | |
| 24/28 | Input: export input_dev data via sysfs attributesdrivers/ | +134 | 0 replies | |
| 25/28 | input core: implement class hierachydrivers/ drivers/ drivers/ +3 more | +188 | 0 replies | |
| 26/28 | input core: remove custom-made hotplug handlerdrivers/ | +110 | 0 replies | |
| 27/28 | Input: convert input handlers to class interfacesdrivers/ include/ | +232 | 0 replies | |
| 28/28 | Input: convert to seq_filedrivers/ | +150 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [patch 00/28] RFC/RFT: Input - sysfs integration
[Argh, resending with subjects and proper CCs]
Hi,
The following set of patches deals with converting input subsystem to the driver model and intergrate it with sysfs. This allows us to remove custom-made input hotplug handler and finally have an option of netlink-only hotplug notifier.
Some changes to the driver core were required. I decided that I did not want to add an additional class to /sys/class directory; instead class code was changed to allow nesting several classes. This way we can have:
/sys/class/input/
|-- devices
| |-- input0
| |-- input1
| `-- input2
`-- interfaces
|-- event0
...
|-- mouse1
`-- ts0and not clutter the top-level directory. Top-level classes define individual subsystems, lower-level classes define individual parts. In this particular case 'devices' directory contains class devices corresponding to input_dev structures whereas 'interfaces' has class devices produced by input interfaces (handlers), such as evdev, mousedev, tsdev and joydev.
I believe that other subsystems, such as firewire, SCSI, USB and I2C could also be moved to a hierarchy of classes to make /sys tree more organized.
Although all this compatible with pre-udev hotplug scripts I was advised that having sub-classes will require some changes to udev.
Class interface code was slightly changed to pass interface to add/remove methods. This way subsystem can have a generic handler and still call individual interfaces's methods if needed. There are couple if I2O patches that deal with class interface code, these are not directly related to this series, but required for compiling. The maintainer acked them and will push with the rest of I2O updates.
When registering class devices hotplug event is now sent before adding interfaces, otherwise children's hotplug events would reach userspace (udev) first.
The full sysfs input hierarchy on by laptop is the following:
[dtor@core ~]$ tree /sys/class/input/ /sys/class/input/
|-- devices
| |-- input0
| | |-- capabilities
| | | |-- abs
| | | |-- ev
| | | |-- ff
| | | |-- key
| | | |-- led
| | | |-- msc
| | | |-- rel
| | | |-- snd
| | | `-- sw
| | |-- device -> ../../../../devices/platform/i8042/serio1
| | |-- event0 -> ../../../../class/input/interfaces/event0
| | |-- id
| | | |-- bustype
| | | |-- product
| | | |-- vendor
| | | `-- version
| | |-- name
| | |-- phys
| | `-- uniq
| |-- input1
| | |-- capabilities
| | | |-- abs
| | | |-- ev
| | | |-- ff
| | | |-- key
| | | |-- led
| | | |-- msc
| | | |-- rel
| | | |-- snd
| | | `-- sw
| | |-- device -> ../../../../devices/platform/i8042/serio0
| | |-- event1 -> ../../../../class/input/interfaces/event1
| | |-- id
| | | |-- bustype
| | | |-- product
| | | |-- vendor
| | | `-- version
| | |-- mouse0 -> ../../../../class/input/interfaces/mouse0
| | |-- name
| | |-- phys
| | |-- ts0 -> ../../../../class/input/interfaces/ts0
| | `-- uniq
| `-- input2
| |-- capabilities
| | |-- abs
| | |-- ev
| | |-- ff
| | |-- key
| | |-- led
| | |-- msc
| | |-- rel
| | |-- snd
| | `-- sw
| |-- device -> ../../../../devices/platform/i8042/serio0/serio2
| |-- event2 -> ../../../../class/input/interfaces/event2
| |-- id
| | |-- bustype
| | |-- product
| | |-- vendor
| | `-- version
| |-- mouse1 -> ../../../../class/input/interfaces/mouse1
| |-- name
| |-- phys
| |-- ts1 -> ../../../../class/input/interfaces/ts1
| `-- uniq
`-- interfaces
|-- event0
| |-- dev
| `-- device -> ../../../../class/input/devices/input0
|-- event1
| |-- dev
| `-- device -> ../../../../class/input/devices/input1
|-- event2
| |-- dev
| `-- device -> ../../../../class/input/devices/input2
|-- mice
| `-- dev
|-- mouse0
| |-- dev
| `-- device -> ../../../../class/input/devices/input1
|-- mouse1
| |-- dev
| `-- device -> ../../../../class/input/devices/input2
|-- ts0
| |-- dev
| `-- device -> ../../../../class/input/devices/input1
`-- ts1
|-- dev
`-- device -> ../../../../class/input/devices/input2Review/comments/testing will be appreciated.
Thank you.
--
Dmitry