2007-06-06 09:11:30

by Lars K.W. Gohlke

[permalink] [raw]
Subject: serio interface

-----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:[email protected]
- -------------------------
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-----


Attachments:
lkwg82.vcf (124.00 B)

2007-06-06 09:15:19

by Jan-Benedict Glaw

[permalink] [raw]
Subject: Re: serio interface

On Wed, 2007-06-06 11:11:23 +0200, Lars K.W. Gohlke <[email protected]> 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 [email protected] +49-172-7608481
Signature of: Friends are relatives you make for yourself.
the second :


Attachments:
(No filename) (525.00 B)
signature.asc (189.00 B)
Digital signature
Download all attachments

2007-06-06 09:35:00

by Lars K.W. Gohlke

[permalink] [raw]
Subject: Re: serio interface

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

Jan-Benedict Glaw schrieb:
> On Wed, 2007-06-06 11:11:23 +0200, Lars K.W. Gohlke <[email protected]> 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-----


Attachments:
lkwg82.vcf (132.00 B)

2007-06-06 09:52:16

by Jan-Benedict Glaw

[permalink] [raw]
Subject: Re: serio interface

On Wed, 2007-06-06 11:34:49 +0200, Lars K.W. Gohlke <[email protected]> wrote:
> Jan-Benedict Glaw schrieb:
> > On Wed, 2007-06-06 11:11:23 +0200, Lars K.W. Gohlke <[email protected]> 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 [email protected] +49-172-7608481
Signature of: Eine Freie Meinung in einem Freien Kopf
the second : für einen Freien Staat voll Freier Bürger.


Attachments:
(No filename) (1.26 kB)
signature.asc (189.00 B)
Digital signature
Download all attachments

2007-06-06 10:39:25

by Lars K.W. Gohlke

[permalink] [raw]
Subject: Re: serio interface

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

Jan-Benedict Glaw schrieb:
> On Wed, 2007-06-06 11:34:49 +0200, Lars K.W. Gohlke <[email protected]> wrote:
>> Jan-Benedict Glaw schrieb:
>>> On Wed, 2007-06-06 11:11:23 +0200, Lars K.W. Gohlke <[email protected]> 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-----


Attachments:
lkwg82.vcf (132.00 B)

2007-06-06 10:44:35

by Jan-Benedict Glaw

[permalink] [raw]
Subject: Re: serio interface

On Wed, 2007-06-06 12:39:17 +0200, Lars K.W. Gohlke <[email protected]> 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 [email protected] +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".


Attachments:
(No filename) (652.00 B)
signature.asc (189.00 B)
Digital signature
Download all attachments

2007-06-06 10:52:22

by Lars K.W. Gohlke

[permalink] [raw]
Subject: Re: serio interface

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

Jan-Benedict Glaw schrieb:
> On Wed, 2007-06-06 12:39:17 +0200, Lars K.W. Gohlke <[email protected]> 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-----


Attachments:
lkwg82.vcf (132.00 B)

2007-06-06 11:20:33

by Jiri Slaby

[permalink] [raw]
Subject: Re: serio interface

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

2007-06-06 11:26:17

by Jan-Benedict Glaw

[permalink] [raw]
Subject: Re: serio interface

On Wed, 2007-06-06 12:52:13 +0200, Lars K.W. Gohlke <[email protected]> wrote:
> Jan-Benedict Glaw schrieb:
> > On Wed, 2007-06-06 12:39:17 +0200, Lars K.W. Gohlke <[email protected]> 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 [email protected] +49-172-7608481
Signature of: ...und wenn Du denkst, es geht nicht mehr,
the second : kommt irgendwo ein Lichtlein her.


Attachments:
(No filename) (1.35 kB)
signature.asc (189.00 B)
Digital signature
Download all attachments

2007-06-06 11:36:37

by Lars K.W. Gohlke

[permalink] [raw]
Subject: Re: serio interface

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

Jan-Benedict Glaw schrieb:
> On Wed, 2007-06-06 12:52:13 +0200, Lars K.W. Gohlke <[email protected]> wrote:
>> Jan-Benedict Glaw schrieb:
>>> On Wed, 2007-06-06 12:39:17 +0200, Lars K.W. Gohlke <[email protected]> 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-----


Attachments:
lkwg82.vcf (132.00 B)

2007-06-07 16:10:38

by Tilman Schmidt

[permalink] [raw]
Subject: Re: serio interface

Am 06.06.2007 11:51 schrieb Jan-Benedict Glaw:
> On Wed, 2007-06-06 11:34:49 +0200, Lars K.W. Gohlke <[email protected]> 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: [email protected]
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Unge?ffnet mindestens haltbar bis: (siehe R?ckseite)


Attachments:
signature.asc (253.00 B)
OpenPGP digital signature

2007-06-08 10:21:31

by Tilman Schmidt

[permalink] [raw]
Subject: Re: serio interface

/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: [email protected]
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Unge?ffnet mindestens haltbar bis: (siehe R?ckseite)


Attachments:
signature.asc (250.00 B)
OpenPGP digital signature