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?
    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Tilman Schmidt schrieb:
    > Am 24.05.2007 21:15 schrieb Lars K.W. Gohlke:
    >> Jan Engelhardt schrieb:
    > [code proposal]
    >>> [I've warned about it... ;-) ]
    >> is it the way to access from kernelspace the userspace fs?
    >> the not-correct-way?
    >
    > Yes, indeed.
    >
    >> If it is so, I will wait for another solution ;)
    >
    > I'm not sure waiting will help. The roasted pigeons will not come
    > flying into your mouth.
    >
    > The possible solutions have been sketched out for you:
    >
    > a) open the device file from the kernel (described by Jan):
    > actively discouraged by the kernelnewbies.org FAQ document,
    > and probably won't even work IMHO
    >
    > b) program the serial port directly (described by Jan):
    > will work only with one type of hardware and you'll have to
    > disable the regular serial driver first; frowned upon by kernel
    > gurus as "reinventing the wheel"
    >
    > c) abuse the line discipline interface (described by me):
    > moderately well documented, and there's precedent for using it
    > that way in the well-accepted PPP module as well as my humble
    > contribution, the ser_gigaset driver; requires a userspace
    > daemon for pushing the line discipline module on the serial
    > port and keeping it there
    >
    > 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.
    >
    > HTH
    > T.
    >

    When I'm chosing option d) can smb. help me step by step? There are so
    many pieces of code I don't understand.

    Ok, let's begin:

    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;

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.3 (MingW32) - GPGrelay v0.959

    iD8DBQFGXSKoAAomYJ1taN8RApggAJ99t+yMvPScr4yhOoTOS9TvYVUMsgCeJAbI
    nGTvFGb49gUOzJG17Nmypq4=
    =K4W8
    -----END PGP SIGNATURE-----
    begin:vcard
    fn:Lars K.W. Gohlke
    n:Gohlke;Lars K.W.
    email;internet:lkwg82@gmx.de
    x-mozilla-html:FALSE
    version:2.1
    end:vcard

    \
     
     \ /
      Last update: 2007-05-30 09:09    [W:0.094 / U:31.120 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site