From: Peter Mamonov <pmamonov@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [RFC] WIP: add usb keyboard driver
Date: Fri, 11 Sep 2015 17:56:53 +0300 [thread overview]
Message-ID: <20150911175653.69871b3b@berta> (raw)
In-Reply-To: <20150910172111.GR18700@pengutronix.de>
On Thu, 10 Sep 2015 19:21:11 +0200
Sascha Hauer <s.hauer@pengutronix.de> wrote:
> On Thu, Sep 10, 2015 at 06:51:33PM +0300, Peter Mamonov wrote:
> > On Thu, 10 Sep 2015 09:38:15 +0200
> > Sascha Hauer <s.hauer@pengutronix.de> wrote:
> >
> > > Excellent! This makes the framebuffer console support complete :)
> >
> > I'm sorry to dissapoint you, but this implementation of the usb
> > keyboard driver seems to be wrong. The driver employs the get_report
> > request to poll the keyboard state via the control endpoint, however
> > the "Device Class Definition for Human Interface Devices (HID)"
> > states the following:
> > "This request is not intended to be used for polling the device
> > state on a regular basis. [...] The Interrupt In pipe should be
> > used for recurring Input reports."
> >
> > I guess this is the source of the problems with some keyboards: 2
> > of 4 keyboards I've tested changed their state only on key down,
> > but not on key up.
>
> Yes, same here. The first keyboard I tested ended up with this
> behaviour, the second worked.
>
> >
> > So, according the standard, we need to poll a keyboard via interrupt
> > endpoint. However, current implementation of EHCI driver doesn't
> > support interrupt transactions: submit_int_msg() in ehci-hcd.c is a
> > stub. I'll try to implement it.
>
> U-Boot has an implementation for it, should be possible to adopt the
> corresponding code.
I've ported missing functionality from the u-boot and switched to
polling via interrupt endpoint. After that all keyboards work fine.
Will clean up the code and post the patches.
Peter
>
> Sascha
>
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2015-09-11 14:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-09 16:36 Peter Mamonov
2015-09-10 7:38 ` Sascha Hauer
2015-09-10 15:51 ` Peter Mamonov
2015-09-10 17:21 ` Sascha Hauer
2015-09-11 14:56 ` Peter Mamonov [this message]
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=20150911175653.69871b3b@berta \
--to=pmamonov@gmail.com \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/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