linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* serio interface
@ 2007-06-06  9:11 Lars K.W. Gohlke
  2007-06-06  9:15 ` Jan-Benedict Glaw
  2007-06-06 11:20 ` Jiri Slaby
  0 siblings, 2 replies; 12+ messages in thread
From: Lars K.W. Gohlke @ 2007-06-06  9:11 UTC (permalink / raw)
  To: linux-kernel

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

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

hallo,

wouldsomebody explain me the serio interface or give me a code link for
very simple example.




thx. in advance

- ------------------------
Mit freundlichen Grüßen
Lars K.W. Gohlke
mailto:lkwg82@gmx.de
- -------------------------
Visit http://www.lars-gohlke.de.vu

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

iD8DBQFGZno8AAomYJ1taN8RAhjXAKClPcVTCJHDSSAjQg5R3lDi5igebgCdFO6h
abt+VE+jOSixX3CRgjdi92o=
=qNoF
-----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


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

* Re: serio interface
  2007-06-06  9:11 serio interface Lars K.W. Gohlke
@ 2007-06-06  9:15 ` Jan-Benedict Glaw
  2007-06-06  9:34   ` Lars K.W. Gohlke
  2007-06-06 11:20 ` Jiri Slaby
  1 sibling, 1 reply; 12+ messages in thread
From: Jan-Benedict Glaw @ 2007-06-06  9:15 UTC (permalink / raw)
  To: Lars K.W. Gohlke; +Cc: linux-kernel

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

On Wed, 2007-06-06 11:11:23 +0200, Lars K.W. Gohlke <lkwg82@gmx.de> wrote:
> wouldsomebody explain me the serio interface or give me a code link for
> very simple example.

What do you want to do with it?  Do you want on the serial port side,
or on the mouse/keyboard/gadget side?  See for example the various
serial keyboards and mice drivers.

MfG, JBG

-- 
      Jan-Benedict Glaw      jbglaw@lug-owl.de              +49-172-7608481
Signature of:                 Friends are relatives you make for yourself.
the second  :

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: serio interface
  2007-06-06  9:15 ` Jan-Benedict Glaw
@ 2007-06-06  9:34   ` Lars K.W. Gohlke
  2007-06-06  9:51     ` Jan-Benedict Glaw
  0 siblings, 1 reply; 12+ messages in thread
From: Lars K.W. Gohlke @ 2007-06-06  9:34 UTC (permalink / raw)
  To: Lars K.W. Gohlke, linux-kernel

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

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

Jan-Benedict Glaw schrieb:
> On Wed, 2007-06-06 11:11:23 +0200, Lars K.W. Gohlke <lkwg82@gmx.de> wrote:
>> wouldsomebody explain me the serio interface or give me a code link for
>> very simple example.
>
> What do you want to do with it?  Do you want on the serial port side,
> or on the mouse/keyboard/gadget side?  See for example the various
> serial keyboards and mice drivers.
>
> MfG, JBG
>
I want on the kernelside process data from first uart-hardware interface
aka ttyS0.

I don't understand the structure of e.g. input/mouse/sermouse.c

where is said, which hardware is used for reading data from?

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

iD8DBQFGZn+7AAomYJ1taN8RAlwOAJ4qP5DnhIE7IJ5pCqDGBD4di4zybACgqBq6
8lSB3Zp7qO/bwCK+WsWL+HU=
=3Fdg
-----END PGP SIGNATURE-----

[-- Attachment #2: lkwg82.vcf --]
[-- Type: text/x-vcard, Size: 132 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


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

* Re: serio interface
  2007-06-06  9:34   ` Lars K.W. Gohlke
@ 2007-06-06  9:51     ` Jan-Benedict Glaw
  2007-06-06 10:39       ` Lars K.W. Gohlke
  2007-06-07 16:13       ` Tilman Schmidt
  0 siblings, 2 replies; 12+ messages in thread
From: Jan-Benedict Glaw @ 2007-06-06  9:51 UTC (permalink / raw)
  To: linux-kernel, Lars K.W. Gohlke

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

On Wed, 2007-06-06 11:34:49 +0200, Lars K.W. Gohlke <lkwg82@gmx.de> wrote:
> Jan-Benedict Glaw schrieb:
> > On Wed, 2007-06-06 11:11:23 +0200, Lars K.W. Gohlke <lkwg82@gmx.de> wrote:
> > > wouldsomebody explain me the serio interface or give me a code link for
> > > very simple example.
> >
> > What do you want to do with it?  Do you want on the serial port side,
> > or on the mouse/keyboard/gadget side?  See for example the various
> > serial keyboards and mice drivers.
>
> I want on the kernelside process data from first uart-hardware interface
> aka ttyS0.
> 
> I don't understand the structure of e.g. input/mouse/sermouse.c
> 
> where is said, which hardware is used for reading data from?

I'm not entirely sure, but I guess that most of the time, you assign a
serial port with the help of `inputattach' to a given device driver,
which expects to find its hardware on that port.

OTOH, why do you want to do the serial stuff in kernel land? Isn't it
a *lot* easier to do it in userspace? What's your specific device you
want to work on?

MfG, JBG

-- 
      Jan-Benedict Glaw      jbglaw@lug-owl.de              +49-172-7608481
Signature of:                     Eine Freie Meinung in einem Freien Kopf
the second  :                   für einen Freien Staat voll Freier Bürger.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: serio interface
  2007-06-06  9:51     ` Jan-Benedict Glaw
@ 2007-06-06 10:39       ` Lars K.W. Gohlke
  2007-06-06 10:44         ` Jan-Benedict Glaw
  2007-06-07 16:13       ` Tilman Schmidt
  1 sibling, 1 reply; 12+ messages in thread
From: Lars K.W. Gohlke @ 2007-06-06 10:39 UTC (permalink / raw)
  To: linux-kernel, Lars K.W. Gohlke

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

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

Jan-Benedict Glaw schrieb:
> On Wed, 2007-06-06 11:34:49 +0200, Lars K.W. Gohlke <lkwg82@gmx.de> wrote:
>> Jan-Benedict Glaw schrieb:
>>> On Wed, 2007-06-06 11:11:23 +0200, Lars K.W. Gohlke <lkwg82@gmx.de> wrote:
>>>> wouldsomebody explain me the serio interface or give me a code link for
>>>> very simple example.
>>> What do you want to do with it?  Do you want on the serial port side,
>>> or on the mouse/keyboard/gadget side?  See for example the various
>>> serial keyboards and mice drivers.
>> I want on the kernelside process data from first uart-hardware interface
>> aka ttyS0.
>>
>> I don't understand the structure of e.g. input/mouse/sermouse.c
>>
>> where is said, which hardware is used for reading data from?
>
> I'm not entirely sure, but I guess that most of the time, you assign a
> serial port with the help of `inputattach' to a given device driver,
> which expects to find its hardware on that port.
>
> OTOH, why do you want to do the serial stuff in kernel land? Isn't it
> a *lot* easier to do it in userspace? What's your specific device you
> want to work on?
>
> MfG, JBG
>

if you want to write a driver, there must be a possibility to get the
data, like others do. (kernel-space)

I want to know where I can get and how to do.

At least I want to be able to copy the data from device to another
(maybe own).

It is to get familiar with that.

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

iD8DBQFGZo7XAAomYJ1taN8RAgdAAJ0f1PilbuuwK8USjfLIDDGR1bPB3QCfdxmn
16d7ERDrASzpOYomyjs80rM=
=ZnRu
-----END PGP SIGNATURE-----

[-- Attachment #2: lkwg82.vcf --]
[-- Type: text/x-vcard, Size: 132 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


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

* Re: serio interface
  2007-06-06 10:39       ` Lars K.W. Gohlke
@ 2007-06-06 10:44         ` Jan-Benedict Glaw
  2007-06-06 10:52           ` Lars K.W. Gohlke
  0 siblings, 1 reply; 12+ messages in thread
From: Jan-Benedict Glaw @ 2007-06-06 10:44 UTC (permalink / raw)
  To: Lars K.W. Gohlke; +Cc: linux-kernel

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

On Wed, 2007-06-06 12:39:17 +0200, Lars K.W. Gohlke <lkwg82@gmx.de> wrote:
> Jan-Benedict Glaw schrieb:
> > OTOH, why do you want to do the serial stuff in kernel land? Isn't it
> > a *lot* easier to do it in userspace? What's your specific device you
> > want to work on?

[snip]

You didn't actually answer any of my questions.

MfG, JBG

-- 
      Jan-Benedict Glaw      jbglaw@lug-owl.de              +49-172-7608481
Signature of:         "really soon now":      an unspecified period of time, likly to
the second  :                                 be greater than any reasonable definition
                                              of "soon".

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: serio interface
  2007-06-06 10:44         ` Jan-Benedict Glaw
@ 2007-06-06 10:52           ` Lars K.W. Gohlke
  2007-06-06 11:26             ` Jan-Benedict Glaw
  0 siblings, 1 reply; 12+ messages in thread
From: Lars K.W. Gohlke @ 2007-06-06 10:52 UTC (permalink / raw)
  To: Lars K.W. Gohlke, linux-kernel

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

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

Jan-Benedict Glaw schrieb:
> On Wed, 2007-06-06 12:39:17 +0200, Lars K.W. Gohlke <lkwg82@gmx.de> wrote:
>> Jan-Benedict Glaw schrieb:
>>> OTOH, why do you want to do the serial stuff in kernel land? Isn't it
>>> a *lot* easier to do it in userspace? What's your specific device you
>>> want to work on?
>
> [snip]
>
> You didn't actually answer any of my questions.
>
> MfG, JBG
>
sorry.

I want to use the interface aka /dev/ttyS0.
I want to process data inside of a kernel module to provide it /proc
(done) or as own char-dev (done).

but I can not grab the data.

It is part of my project in my studies.

It is more a conceptual work, but important. I want to release a howto,
when I complete.

answered completely? ;) Hope so.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32) - GPGrelay v0.959

iD8DBQFGZpHfAAomYJ1taN8RApsWAJ970RteJmHUsHocvt71lIvNSzk+XQCgxxg1
gxXm4kZRrRgrhIWfHPKTwEo=
=zMd7
-----END PGP SIGNATURE-----

[-- Attachment #2: lkwg82.vcf --]
[-- Type: text/x-vcard, Size: 132 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


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

* Re: serio interface
  2007-06-06  9:11 serio interface Lars K.W. Gohlke
  2007-06-06  9:15 ` Jan-Benedict Glaw
@ 2007-06-06 11:20 ` Jiri Slaby
  1 sibling, 0 replies; 12+ messages in thread
From: Jiri Slaby @ 2007-06-06 11:20 UTC (permalink / raw)
  To: Lars K.W. Gohlke; +Cc: linux-kernel

Lars K.W. Gohlke napsal(a):
> hallo,
> 
> wouldsomebody explain me the serio interface or give me a code link for
> very simple example.

Something like this?
http://examples.oreilly.com/linuxdrive3/

examples/tty/tiny_serial.c

Some things are obsoleted, but main code flow remains.

regards,
-- 
http://www.fi.muni.cz/~xslaby/            Jiri Slaby
faculty of informatics, masaryk university, brno, cz
e-mail: jirislaby gmail com, gpg pubkey fingerprint:
B674 9967 0407 CE62 ACC8  22A0 32CC 55C3 39D4 7A7E

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

* Re: serio interface
  2007-06-06 10:52           ` Lars K.W. Gohlke
@ 2007-06-06 11:26             ` Jan-Benedict Glaw
  2007-06-06 11:36               ` Lars K.W. Gohlke
  0 siblings, 1 reply; 12+ messages in thread
From: Jan-Benedict Glaw @ 2007-06-06 11:26 UTC (permalink / raw)
  To: Lars K.W. Gohlke; +Cc: linux-kernel

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

On Wed, 2007-06-06 12:52:13 +0200, Lars K.W. Gohlke <lkwg82@gmx.de> wrote:
> Jan-Benedict Glaw schrieb:
> > On Wed, 2007-06-06 12:39:17 +0200, Lars K.W. Gohlke <lkwg82@gmx.de> wrote:
> > > Jan-Benedict Glaw schrieb:
> > > > OTOH, why do you want to do the serial stuff in kernel land? Isn't it
> > > > a *lot* easier to do it in userspace? What's your specific device you
> > > > want to work on?
>
> > You didn't actually answer any of my questions.

> sorry.
> 
> I want to use the interface aka /dev/ttyS0.
> I want to process data inside of a kernel module to provide it /proc
> (done) or as own char-dev (done).
> 
> but I can not grab the data.
> 
> It is part of my project in my studies.
> 
> It is more a conceptual work, but important. I want to release a howto,
> when I complete.

You still answer unasked questions. Please answer inline:

  * Why do you wanto to do the serial stuff in kernel land?

  * Isn't it easier to do it in userspace?

  * What specific device do you work on?

  * New: Is it a wise idea to do it in kernel land?

The /proc filesystem has been somewhat obsoleted in favour of sysfs
for device/driver information.

-- 
      Jan-Benedict Glaw      jbglaw@lug-owl.de              +49-172-7608481
Signature of:                   ...und wenn Du denkst, es geht nicht mehr,
the second  :                          kommt irgendwo ein Lichtlein her.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: serio interface
  2007-06-06 11:26             ` Jan-Benedict Glaw
@ 2007-06-06 11:36               ` Lars K.W. Gohlke
  0 siblings, 0 replies; 12+ messages in thread
From: Lars K.W. Gohlke @ 2007-06-06 11:36 UTC (permalink / raw)
  To: Lars K.W. Gohlke, linux-kernel

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

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

Jan-Benedict Glaw schrieb:
> On Wed, 2007-06-06 12:52:13 +0200, Lars K.W. Gohlke <lkwg82@gmx.de> wrote:
>> Jan-Benedict Glaw schrieb:
>>> On Wed, 2007-06-06 12:39:17 +0200, Lars K.W. Gohlke <lkwg82@gmx.de> wrote:
>>>> Jan-Benedict Glaw schrieb:
>>>>> OTOH, why do you want to do the serial stuff in kernel land? Isn't it
>>>>> a *lot* easier to do it in userspace? What's your specific device you
>>>>> want to work on?
>>> You didn't actually answer any of my questions.
>
>> sorry.
>>
>> I want to use the interface aka /dev/ttyS0.
>> I want to process data inside of a kernel module to provide it /proc
>> (done) or as own char-dev (done).
>>
>> but I can not grab the data.
>>
>> It is part of my project in my studies.
>>
>> It is more a conceptual work, but important. I want to release a howto,
>> when I complete.
>
> You still answer unasked questions. Please answer inline:
>
>   * Why do you wanto to do the serial stuff in kernel land?
It is more a conceptual work, but important. I want to release a howto,
when I complete.
>
>   * Isn't it easier to do it in userspace?
yes
>
>   * What specific device do you work on?
I want to use the interface aka /dev/ttyS0. (text-stream)
>
>   * New: Is it a wise idea to do it in kernel land?
no, explicitly not. To get known hwo to deal with data from devices.
>
> The /proc filesystem has been somewhat obsoleted in favour of sysfs
> for device/driver information.
>

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

iD8DBQFGZpw/AAomYJ1taN8RAspMAKDKXxTysCIJ/IF0DcTpdlKRqjW+AwCgjxt+
5HY6RFy2LpUaT6q95U2PgdQ=
=V+MM
-----END PGP SIGNATURE-----

[-- Attachment #2: lkwg82.vcf --]
[-- Type: text/x-vcard, Size: 132 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


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

* Re: serio interface
  2007-06-06  9:51     ` Jan-Benedict Glaw
  2007-06-06 10:39       ` Lars K.W. Gohlke
@ 2007-06-07 16:13       ` Tilman Schmidt
  2007-06-08 10:21         ` Tilman Schmidt
  1 sibling, 1 reply; 12+ messages in thread
From: Tilman Schmidt @ 2007-06-07 16:13 UTC (permalink / raw)
  To: linux-kernel

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

Am 06.06.2007 11:51 schrieb Jan-Benedict Glaw:
> On Wed, 2007-06-06 11:34:49 +0200, Lars K.W. Gohlke <lkwg82@gmx.de> wrote:

>> I want on the kernelside process data from first uart-hardware interface
>> aka ttyS0.
>>
>> I don't understand the structure of e.g. input/mouse/sermouse.c
>>
>> where is said, which hardware is used for reading data from?
> 
> I'm not entirely sure, but I guess that most of the time, you assign a
> serial port with the help of `inputattach' to a given device driver,
> which expects to find its hardware on that port.
> 
> OTOH, why do you want to do the serial stuff in kernel land? Isn't it
> a *lot* easier to do it in userspace? What's your specific device you
> want to work on?

May I chime in here, as it's a topic I am interested in too.

Have a look at drivers/isdn/gigaset/ser-gigaset.c if you like,
a driver for an ISDN adapter attached via RS232.

This is currently implemented as a line discipline, but I consider
that a hack. For one thing, it doesn't really fit the concept of a
line discipline because it doesn't transform the serial datastream
but instead diverts it completely to the isdn4linux subsystem. And
second, it means that a userspace daemon is needed which does
nothing but open the serial port, set the line discipline on it,
and go to sleep in order to keep the line discipline loaded.

The serio approach used by input/mouse/sermouse.c might provide a
more sensible way of driving that kind of device.

-- 
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)


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 253 bytes --]

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

* Re: serio interface
  2007-06-07 16:13       ` Tilman Schmidt
@ 2007-06-08 10:21         ` Tilman Schmidt
  0 siblings, 0 replies; 12+ messages in thread
From: Tilman Schmidt @ 2007-06-08 10:21 UTC (permalink / raw)
  To: linux-kernel

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

/me wrote:
> Have a look at drivers/isdn/gigaset/ser-gigaset.c if you like,
> a driver for an ISDN adapter attached via RS232.
> 
> This is currently implemented as a line discipline, but I consider
> that a hack. [...]
> The serio approach used by input/mouse/sermouse.c might provide a
> more sensible way of driving that kind of device.

Apparently it won't. As I have learned in the meantime, the serio
mechanism in turn just uses a line discipline to actually attach
itself to the serial port. So the line discipline interface
remains "the" way to write a layered driver on top of RS232.

Thanks,

-- 
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)


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

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

end of thread, other threads:[~2007-06-08 10:21 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-06  9:11 serio interface Lars K.W. Gohlke
2007-06-06  9:15 ` Jan-Benedict Glaw
2007-06-06  9:34   ` Lars K.W. Gohlke
2007-06-06  9:51     ` Jan-Benedict Glaw
2007-06-06 10:39       ` Lars K.W. Gohlke
2007-06-06 10:44         ` Jan-Benedict Glaw
2007-06-06 10:52           ` Lars K.W. Gohlke
2007-06-06 11:26             ` Jan-Benedict Glaw
2007-06-06 11:36               ` Lars K.W. Gohlke
2007-06-07 16:13       ` Tilman Schmidt
2007-06-08 10:21         ` Tilman Schmidt
2007-06-06 11:20 ` Jiri Slaby

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).