All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 00/28] RFC/RFT: Input - sysfs integration
@ 2005-09-15  7:01 Dmitry Torokhov
  2005-09-15  7:01 ` [patch 01/28] I2O: remove class interface Dmitry Torokhov
                   ` (27 more replies)
  0 siblings, 28 replies; 54+ messages in thread
From: Dmitry Torokhov @ 2005-09-15  7:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Greg KH, Kay Sievers, Vojtech Pavlik,
	Hannes Reinecke

[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
    `-- ts0

and 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/input2

Review/comments/testing will be appreciated.

Thank you.

--
Dmitry


^ permalink raw reply	[flat|nested] 54+ messages in thread

end of thread, other threads:[~2005-10-07  6:49 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-15  7:01 [patch 00/28] RFC/RFT: Input - sysfs integration Dmitry Torokhov
2005-09-15  7:01 ` [patch 01/28] I2O: remove class interface Dmitry Torokhov
2005-09-27  0:03   ` Greg KH
2005-09-27  8:39     ` Markus Lidel
2005-09-15  7:01 ` [patch 02/28] I2O: remove i2o_device_class Dmitry Torokhov
2005-09-27  0:28   ` Greg KH
2005-09-15  7:01 ` [patch 03/28] Driver core: allow nesting classes Dmitry Torokhov
2005-09-15  7:01 ` [patch 04/28] Driver core: make parent class define subsystem Dmitry Torokhov
2005-09-15  7:01 ` [patch 05/28] Driver core: pass interface to class intreface methods Dmitry Torokhov
2005-09-15  7:01 ` [patch 06/28] Driver core: send hotplug event before adding class interfaces Dmitry Torokhov
2005-09-15  7:01 ` [patch 07/28] Input: kill devfs references Dmitry Torokhov
2005-09-15  7:01 ` [patch 08/28] Input: prepare to sysfs integration Dmitry Torokhov
2005-10-05 22:03   ` Greg KH
2005-10-05 22:17     ` Dmitry Torokhov
2005-10-05 22:55       ` Greg KH
2005-10-06 17:46         ` Dmitry Torokhov
2005-10-06 23:05           ` Vojtech Pavlik
2005-10-07  3:58             ` Dmitry Torokhov
2005-10-07  6:41               ` Al Viro
2005-10-07  6:49                 ` Dmitry Torokhov
2005-09-15  7:01 ` [patch 09/28] Input: convert net/bluetooth to dynamic input_dev allocation Dmitry Torokhov
2005-09-15  7:54   ` Marcel Holtmann
2005-09-15 14:22     ` Dmitry Torokhov
2005-09-15 14:41       ` Marcel Holtmann
2005-09-15 19:07         ` Vojtech Pavlik
2005-09-15 19:22           ` Dmitry Torokhov
2005-09-15 19:31             ` Greg KH
2005-09-15 19:52               ` Dmitry Torokhov
2005-09-15 20:25             ` Vojtech Pavlik
2005-09-15 20:55               ` Dmitry Torokhov
2005-09-15 21:16                 ` Vojtech Pavlik
2005-09-15  7:01 ` [patch 10/28] Input: convert drivers/macintosh " Dmitry Torokhov
2005-09-15  7:01 ` [patch 11/28] Input: convert konicawc " Dmitry Torokhov
2005-09-15  7:01 ` [patch 12/28] Input: convert onetouch " Dmitry Torokhov
2005-09-15  7:01 ` [patch 13/28] drivers/input/mouse: convert " Dmitry Torokhov
2005-09-15  7:01 ` [patch 14/28] drivers/input/keyboard: " Dmitry Torokhov
2005-09-15  7:01 ` [patch 15/28] drivers/input/touchscreen: " Dmitry Torokhov
2005-09-15  7:01 ` [patch 17/28] Input: convert ucb1x00-ts " Dmitry Torokhov
2005-09-15  7:01 ` [patch 18/28] Input: convert sound/ppc/beep " Dmitry Torokhov
2005-09-15  7:01 ` [patch 19/28] Input: convert sonypi " Dmitry Torokhov
2005-09-15  7:01 ` [patch 20/28] Input: convert driver/input/misc " Dmitry Torokhov
2005-09-15  7:01 ` [patch 22/28] drivers/media: convert " Dmitry Torokhov
2005-09-15  7:01 ` [patch 23/28] Input: show sysfs path in /proc/bus/input/devices Dmitry Torokhov
2005-09-15  7:01 ` [patch 24/28] Input: export input_dev data via sysfs attributes Dmitry Torokhov
2005-09-15  7:01 ` [patch 25/28] input core: implement class hierachy Dmitry Torokhov
2005-09-15  7:01 ` [patch 26/28] input core: remove custom-made hotplug handler Dmitry Torokhov
2005-09-15  7:01 ` [patch 27/28] Input: convert input handlers to class interfaces Dmitry Torokhov
2005-09-15  7:01 ` [patch 28/28] Input: convert to seq_file Dmitry Torokhov
2005-09-15  7:59 ` [patch 00/28] RFC/RFT: Input - sysfs integration Marcel Holtmann
2005-09-15 14:27   ` Dmitry Torokhov
     [not found] ` <20050915070304.070090000.dtor_core@ameritech.net>
2005-09-16  3:53   ` [patch 16/28] drivers/usb/input: convert to dynamic input_dev allocation Andrew Morton
2005-09-16  3:59     ` Dmitry Torokhov
2005-09-16  4:18       ` Andrew Morton
2005-09-16  4:30         ` Dmitry Torokhov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.