mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Lars K.W. Gohlke" <lkwg82@gmx.de>
To: Tilman Schmidt <tilman@imap.cc>
Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>, linux-kernel@vger.kernel.org
Subject: Re: How to access correctly serial port inside module?
Date: Wed, 30 May 2007 09:46:52 +0200	[thread overview]
Message-ID: <465D2BEC.2090008@gmx.de> (raw)
In-Reply-To: <465D22A6.4090107@gmx.de>

[-- Attachment #1: Type: text/plain, Size: 2651 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Lars K.W. Gohlke schrieb:
> -----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-----


[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?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32) - GPGrelay v0.959

iD8DBQFGXSvtAAomYJ1taN8RAjYtAKDfYqyK//u96/sxWMdLuUfRtMi2XwCg031C
lfEog7wFwd280dJeoqEZvu4=
=AH3F
-----END PGP SIGNATURE-----

[-- Attachment #2: lkwg82.vcf --]
[-- Type: text/x-vcard, Size: 124 bytes --]

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


  reply	other threads:[~2007-05-30  7:46 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-14 13:00 Lars K.W. Gohlke
2007-05-14 17:40 ` Lars K.W. Gohlke
2007-05-14 20:00   ` Jan Engelhardt
2007-05-14 20:25     ` Lars K.W. Gohlke
2007-05-14 23:00     ` Tilman Schmidt
2007-05-15  8:43       ` Jan Engelhardt
2007-05-22 22:17         ` Tilman Schmidt
2007-05-24 10:22           ` Lars K.W. Gohlke
2007-05-24 10:26             ` Jan Engelhardt
2007-05-24 10:45               ` Lars K.W. Gohlke
2007-05-24 10:50                 ` Jan Engelhardt
2007-05-24 11:20                   ` Lars K.W. Gohlke
2007-05-24 17:03             ` Tilman Schmidt
2007-05-24 17:19               ` Lars K.W. Gohlke
2007-05-24 17:29                 ` Jan Engelhardt
2007-05-24 19:15                   ` Lars K.W. Gohlke
2007-05-28 17:05                     ` Tilman Schmidt
2007-05-28 19:03                       ` Jan Engelhardt
2007-05-30  7:07                       ` Lars K.W. Gohlke
2007-05-30  7:46                         ` Lars K.W. Gohlke [this message]
2007-05-30  9:38                           ` Tilman Schmidt
     [not found]       ` <851fc09e0705162315w3380ddabh9b9f0b2198cb8457@mail.gmail.com>
2007-05-22 21:55         ` Tilman Schmidt
2007-06-03 20:28           ` Lars K.W. Gohlke
2007-06-05 21:41             ` Tilman Schmidt
2007-06-06  8:27               ` Lars K.W. Gohlke
2007-06-07 22:25                 ` Lars K.W. Gohlke
2007-06-08  0:27                   ` Tilman Schmidt
2007-05-14 22:37 ` Tilman Schmidt
2007-05-24 10:51   ` Lars K.W. Gohlke
2007-06-05  7:55 Lars K.W. Gohlke
2007-06-07 22:27 Lars K.W. Gohlke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=465D2BEC.2090008@gmx.de \
    --to=lkwg82@gmx.de \
    --cc=jengelh@linux01.gwdg.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tilman@imap.cc \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome