All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: [PATCH] serio.c: dynamically control serio ports bindings via procfs (Was: [RFC/RFT] Raw access to serio ports)
@ 2004-06-02 19:09 Dmitry Torokhov
  2004-06-03  5:54 ` Sau Dan Lee
  0 siblings, 1 reply; 9+ messages in thread
From: Dmitry Torokhov @ 2004-06-02 19:09 UTC (permalink / raw)
  To: Sau Dan Lee
  Cc: linux-kernel, Tuukka Toivonen, Andries Brouwer, Vojtech Pavlik

Sau Dan Lee wrote:
> 
> I've  added procfs  support to  serio.c, so  that we  can  now control
> dynamically which serio ports connect  to which serio devices.  I call
> it "serio_switch", because it conceptually works like a patch panel or
> a switch with which you can rewire the connections.

Let me start with saying that this is a very good patch and that is
exactly what I have in mind with regard to serio port/device binding.
The only problem with the patch is that it uses wrong foundation, namely
procfs, because:
 
- procfs hierarchy is disconnected from the rest of the system. You
  cannot trace device ownership starting with root PCI bus down to your
  AUX port.
- there is no automatic hotplug notification to the userspace
- it is not flexible with regard to adding custom attributes to the
  drivers. I can see you adding rate and resolution to psmouse driver
  and repeat rate to atkbd. With sysfs drivers can themselves create
  attributes and they will be cleaned up once device disappears. With
  procfs you will have to export it form serio to be available to
  drivers and cleanup can be a nightmare.

Of course sysfs has its "problems" - it requires users to follow certain
lifetime rules which are different from what serio uses at the moment.

So we have several options - if we adopt procfs based solution now we
will have to maintain it for very long time, along with competing sysfs
implementation. Dropping one kernel parameter which will never be widely
used is much easier, IMO.

So I propose we all join our ranks and tame that sysfs together ;) I had
some patches that were converting drivers to the sysfs adding them to
serio bus, I probably should just send what I have as is for review
(I was going to rediff them as they are somewhat stale, I'll see what
shape they are later tonight).

--
Dmitry


^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: [RFC/RFT] Raw access to serio ports (2/2)
@ 2004-06-02  9:49 Sau Dan Lee
  2004-06-02 12:33 ` Dmitry Torokhov
  0 siblings, 1 reply; 9+ messages in thread
From: Sau Dan Lee @ 2004-06-02  9:49 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-kernel

>>>>> "Dmitry" == Dmitry Torokhov <dtor_core@ameritech.net> writes:

    Dmitry> +static unsigned int i8042_aux_raw[4];

So,  only AUX ports  can be  directly accessed?   No direct  access to
keyboard port?  Why?

The  SERIO_USERDEV  patch  does  allow  direct access  to  the  PC  AT
keyboard, and it did help me  locate the SysRq problem that I reported
in  other postings.   i.e.  it IS  useful  to be  able  to access  the
keyboard port directly.


    Dmitry> The driver will happily co-exist with psmouse and atkbd
    Dmitry> loaded as they ignore SERIO_8042_RAW ports, so it is
    Dmitry> possible to have one AUX port in raw mode and other in
    Dmitry> standard 2.6 mode.

1) there is no RAW access to the keyboard port;

2) I   hate  this   black  magic,   in  which   the   input  "devices"
   (i.e. drivers)  kidnap the serio  ports they like according  to the
   port  type SERIO_8042_RAW, etc.   That's a  kind of  hardcoding the
   binding between ports and drivers.


Isn't it better to leave the AUX ports as SERIO_8042, and let the user
dynamically change  this port<-->driver binding?  Then,  we don't even
need  that ugly  "i8042.raw" boot  parameter or  i8042_aux_raw option.
The  user can  decide  which  ports are  connected  to your  serio_raw
driver, and which ports are  connected to psmouse.ko.  That would also
allow multiple drivers driving the ports of the same type.  



-- 
Sau Dan LEE                     李守敦(Big5)                    ~{@nJX6X~}(HZ) 

E-mail: danlee@informatik.uni-freiburg.de
Home page: http://www.informatik.uni-freiburg.de/~danlee


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

end of thread, other threads:[~2004-06-03  7:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-02 19:09 [PATCH] serio.c: dynamically control serio ports bindings via procfs (Was: [RFC/RFT] Raw access to serio ports) Dmitry Torokhov
2004-06-03  5:54 ` Sau Dan Lee
2004-06-03  6:16   ` Dmitry Torokhov
2004-06-03  6:45     ` Sau Dan Lee
2004-06-03  6:58       ` Dmitry Torokhov
2004-06-03  7:22         ` Sau Dan Lee
2004-06-03  7:39           ` Dmitry Torokhov
2004-06-03  7:47             ` Sau Dan Lee
  -- strict thread matches above, loose matches on Subject: below --
2004-06-02  9:49 [RFC/RFT] Raw access to serio ports (2/2) Sau Dan Lee
2004-06-02 12:33 ` Dmitry Torokhov
2004-06-02 17:24   ` [PATCH] serio.c: dynamically control serio ports bindings via procfs (Was: [RFC/RFT] Raw access to serio ports) Sau Dan Lee

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.