Re: [PATCH 8/11] serio sysfs integration

From: Dmitry Torokhov
Date: Fri Jun 18 2004 - 07:51:58 EST


On Friday 18 June 2004 04:38 am, Andrew Morton wrote:
> Dmitry Torokhov <dtor_core@xxxxxxxxxxxxx> wrote:
> >
> > Input: serio sysfs integration
>
> What is the sysfs directory layout, and what do the chosen nodes do?
>
> What design decisions were made when choosing that layout?
>
> Is it so trivial that users don't need any documentation?
>

I do consider it trivial for now as the only thing that user can do is
"echo" desired driver into serioX/driver to rebind it. The typical node
looks like this:

[dtor@core dtor]$ ls -la /sys/bus/serio/devices/serio0/
total 0
-r--r--r-- 1 root root 4096 Jun 17 21:49 description
-rw-r--r-- 1 root root 4096 Jun 17 21:49 detach_state
-rw-r--r-- 1 root root 0 Jun 18 02:52 driver
-r--r--r-- 1 root root 4096 Jun 17 21:49 legacy_position
drwxr-xr-x 2 root root 0 Jun 17 21:49 power
drwxr-xr-x 3 root root 0 Jun 18 02:52 serio3

description - i8042 Aux Port
driver - psmouse
legacy_position - isa0060/serio1 (take from serio's phys, can be used
to match with /proc/bus/input/devices).

Every driver will have a set of custom attributes that will be documented
on one by one basis. Btw, where would you document it? Documentation
directory entry? Something else?

--
Dmitry

[dtor@core dtor]$ ls -laR /sys/bus/serio/
/sys/bus/serio/:
total 0
drwxr-xr-x 2 root root 0 Jun 18 02:52 devices
drwxr-xr-x 5 root root 0 Jun 18 02:52 drivers

/sys/bus/serio/devices:
total 0
lrwxrwxrwx 1 root root 0 Jun 17 21:49 serio0 -> ../../../devices/serio0
lrwxrwxrwx 1 root root 0 Jun 17 21:49 serio1 -> ../../../devices/serio1
lrwxrwxrwx 1 root root 0 Jun 18 02:52 serio3 -> ../../../devices/serio0/serio3

/sys/bus/serio/drivers:
total 0
drwxr-xr-x 2 root root 0 Jun 17 21:49 atkbd
drwxr-xr-x 2 root root 0 Jun 18 02:52 psmouse
drwxr-xr-x 2 root root 0 Jun 18 02:52 serio_raw

/sys/bus/serio/drivers/atkbd:
total 0
-r--r--r-- 1 root root 4096 Jun 17 21:49 description
lrwxrwxrwx 1 root root 0 Jun 17 21:49 serio1 -> ../../../../devices/serio1

/sys/bus/serio/drivers/psmouse:
total 0
-r--r--r-- 1 root root 4096 Jun 18 02:52 description
lrwxrwxrwx 1 root root 0 Jun 18 02:52 serio0 -> ../../../../devices/serio0
lrwxrwxrwx 1 root root 0 Jun 18 02:52 serio3 -> ../../../../devices/serio0/serio3

/sys/bus/serio/drivers/serio_raw:
total 0
-r--r--r-- 1 root root 4096 Jun 18 02:50 description

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/