lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Fri, 30 Aug 2013 08:00:37 -0500
From:	Daniel Santos <danielfsantos@....net>
To:	LKML <linux-kernel@...r.kernel.org>,
	linux-usb <linux-usb@...r.kernel.org>,
	linux-spi <linux-spi@...r.kernel.org>,
	linux-gpio <linux-gpio@...r.kernel.org>
Subject: USB-to-SPI bridge to spi protocol driver w/ interrupts?

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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ