lkml.org 
[lkml]   [2007]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: How to access correctly serial port inside module?
Lars K.W. Gohlke schrieb:
> Lars K.W. Gohlke schrieb:
>> Tilman Schmidt schrieb:
[...]
>>> d) use the serio interface (described by Ying Huang):
>>> potentially cleaner conceptually and seems to work without a
>>> userspace daemon, but apparently not documented anywhere
>>> except in the source files drivers/input/serio/serport.c
>>> and linux/drivers/input/mouse/sermouse.c
>>>
>>> Now it's your turn to decide.
>
>> When I'm chosing option d) can smb. help me step by step? There are so
>> many pieces of code I don't understand.

That was Ying Huang's suggestion, so he might be best able to help
you. But I see you haven't included him in the recipient list of
your mail.

>> my kernel source base is : ubuntu-lts 6.06 and 2.6.15-7
>> http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.15.y.git;a=tree;f=drivers/input/serio;

Perhaps it would be better to use a current kernel? It's always an
additional difficulty if one has to go back in history.

> [linux/drivers/input/mouse/sermouse.c]
>
> Where can I see, which serial line is used to get data stream from?
>
> The mouse is plugged in. Where is the decision made, that maybe port0 is
> used?

I have no idea. As I said, I have used a different interface and
this one is essentially undocumented. If I had to use it I would
probably try to follow the flow of control from the
serio_register_driver() call in sermouse_init() in order to see
where the .connect method ends up being called. But again, Ying
Huang was the one who suggested that interface, so hopefully he
might be able to tell you more.

HTH
T.

--
Tilman Schmidt E-Mail: tilman@imap.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2007-05-30 11:43    [W:0.062 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site