From: bmeneguele@gmail.com (Bruno E. O. Meneguele)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Input device driver
Date: Sat, 30 Sep 2017 09:05:46 -0300 [thread overview]
Message-ID: <20170930120546.GB9452@glitch> (raw)
In-Reply-To: <20170930074208.GA13070@kroah.com>
On 30-09, Greg KH wrote:
> On Fri, Sep 29, 2017 at 09:19:05PM -0300, Bruno E. O. Meneguele wrote:
> > On 29-09, valdis.kletnieks at vt.edu wrote:
> > > On Fri, 29 Sep 2017 19:38:49 -0300, "Bruno E. O. Meneguele" said:
> > >
> > > > 2) I'm using a USB keyboard as the testing device, and TBH I got
> > > > confused if I could actually use the input subsystem for that or I
> > > > _should_ use HID instead (considering the keyboard is HID compliant).
> > >
> > > Step 0: Decide if you're writing an interrupt handling driver, a USB driver, or
> > > an HID driver - the three live at different levels of abstraction, and
> > > confusing them will also confuse both you and your kernel.
> > >
> >
> > I don't know why I didn't realize earlier the two counterparts:
> > interruption vs USB, USB devices are handled in polling mode, not
> > with IRQs.
>
> It's not that simple. USB devices only work when the host asks them for
> data, so yes, that can be called "polling", but on the host (i.e. your
> computer), IRQs are used to get the data from the USB host controller.
> The USB driver is notified with the data from the mouse in IRQ context,
> so you do have to be aware of IRQ issues when dealing with USB devices.
>
Ah ok, I understand. Considering I'm going to write an USB device now
I'll dive in LDD3 and other docs to better understand USB subsystem.
Thank you very much for this clarification gregkh.
> best of luck,
>
Thanks! :) I hope be back "soon" with some progress.
--
bmeneg
PGP Key: http://bmeneg.com/pubkey.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20170930/fd2b726a/attachment.bin
prev parent reply other threads:[~2017-09-30 12:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-29 22:38 Input device driver Bruno E. O. Meneguele
2017-09-29 23:09 ` valdis.kletnieks at vt.edu
2017-09-30 0:19 ` Bruno E. O. Meneguele
2017-09-30 7:42 ` Greg KH
2017-09-30 12:05 ` Bruno E. O. Meneguele [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=20170930120546.GB9452@glitch \
--to=bmeneguele@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.