public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Santos <danielfsantos@att.net>
To: LKML <linux-kernel@vger.kernel.org>,
	linux-usb <linux-usb@vger.kernel.org>,
	linux-spi <linux-spi@vger.kernel.org>,
	linux-gpio <linux-gpio@vger.kernel.org>
Subject: USB-to-SPI bridge to spi protocol driver w/ interrupts?
Date: Fri, 30 Aug 2013 08:00:37 -0500	[thread overview]
Message-ID: <52209775.7020206@att.net> (raw)

So I'm near being finished with my MCP2210 driver (a USB-to-SPI bridge 
with GPIOs) and have started writing an spi protocol driver for one of 
the devices I'll be talking to, the ADNS-9800.  However, this device has 
an interrupt output pin and I can't figure out how to communicate that 
interrupt from the MCP2210 driver to the ADNS-9800 driver.

If the ADNS-9800 were on the same board as the rest of my computer, I 
would just attach this to an interrupt line, but USB is not an 
interrupt-driven interface.  So in the MCP2210 driver, I poll the device 
and am aware of when these interrupts occur on the remote board (the 
MCP2210 actually has a dedicated interrupt counter functionality), but 
how do deal with this on the host? Should I create a softirq? If so, 
where is this documented? Or should I use some other mechanism?

I hope this isn't a situation where there isn't yet a framework in place 
to do this cleanly.  I'm guessing that these cheap "bridge" types of 
chips will become more popular over time, so running drivers on a host 
computer that communicates with devices on the other side of such 
bridges will become more common in the future as well. They are also 
very nice for prototyping.

My current driver is on github: 
https://github.com/daniel-santos/mcp2210-linux/

Daniel



                 reply	other threads:[~2013-08-30 13:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=52209775.7020206@att.net \
    --to=danielfsantos@att.net \
    --cc=daniel.santos@pobox.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linux-usb@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox