From: Jean Delvare <khali@linux-fr.org>
To: Dmitry Torokhov <dtor@insightbb.com>
Cc: LKML <linux-kernel@vger.kernel.org>, Vojtech Pavlik <vojtech@ucw.cz>
Subject: Re: Writing a driver for a legacy serial device
Date: Thu, 21 Jun 2007 11:33:58 +0200 [thread overview]
Message-ID: <20070621113358.1d65678d@hyperion.delvare> (raw)
In-Reply-To: <200706202311.33326.dtor@insightbb.com>
Hi Dmitry,
On Wed, 20 Jun 2007 23:11:32 -0400, Dmitry Torokhov wrote:
> On Wednesday 20 June 2007 04:56, Jean Delvare wrote:
> > Ah, I see. There's no way to detect what device is connected to the
> > serial port, so we need a user-space tool to bind the port to the right
> > driver? Makes some sense, even though it's a but strange that I need
> > something called inputattach for a device which isn't an input device.
>
> Because serio interface is mostly used with input devices. For all other
> devices I think universal answer is "userspace" but with input devices
> we want to do processing in kernel so we can route events into console
> and other standard interfaces (although one coudl use uinput to achieve
> similar result).
OK. This leads me to a question: is it OK for me to add support for my
non-input device to inputattach, or is a separate, dedicated helper
tool preferred? Both ways are fine with me, I don't know what the input
subsystem maintainers expect.
> > But unfortunately, my driver's .connect function is still not called.
> > I guess that I missed one step? Any idea what it would be?
>
> Not sure. Could you check /sys/bus/serio/devices/serioX/id/* and verify
> that inputattach sets up serio port properly?
Thanks for the hint, I checked that and the proto value was 42 instead
of the expected 40. Reading the source code of my local copy of
inputattach.c, I found that SERIO_RS232 was OR'd to the value. This
seems to be a rather old bug which is already fixed upstream:
http://linuxconsole.cvs.sourceforge.net/linuxconsole/ruby/utils/inputattach.c?r1=1.23&r2=1.24
But for some reason the openSuse package is lagging behind. I'll go
update it.
After fixing this, I finally see my .connect function being called! Now
I can start doing the real driver development work. Thanks a lot for
your highly valuable help, Dmitry :)
--
Jean Delvare
next prev parent reply other threads:[~2007-06-21 9:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-19 17:05 Jean Delvare
2007-06-19 18:59 ` Dmitry Torokhov
2007-06-20 8:56 ` Jean Delvare
2007-06-21 3:11 ` Dmitry Torokhov
2007-06-21 9:33 ` Jean Delvare [this message]
2007-06-21 14:47 ` David Woodhouse
2007-06-21 18:38 ` Jean Delvare
2007-06-21 23:31 ` Arnd Bergmann
2007-06-22 19:47 ` Dmitry Torokhov
2007-06-23 8:34 ` Jean Delvare
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=20070621113358.1d65678d@hyperion.delvare \
--to=khali@linux-fr.org \
--cc=dtor@insightbb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vojtech@ucw.cz \
/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