Re: "Virtual" Interrupts -- Need help please

2013-09-11 Thread Daniel Santos
On 09/10/2013 01:01 PM, Mark Brown wrote: On Mon, Sep 09, 2013 at 04:12:21PM -0500, Daniel Santos wrote: One of my original requirements for this driver is that it is reusable for different devices that use the MCP2210, not just my own hardware. There are a number of ways to accomplish this

Re: "Virtual" Interrupts -- Need help please

2013-09-09 Thread Daniel Santos
On 09/09/2013 06:06 AM, Mark Brown wrote: On Sat, Sep 07, 2013 at 07:19:06PM -0500, Daniel Santos wrote: So do i create an IRQ domain and then call generic_handle_irq() from my URB complete() function? If so, which type of IRQ Domain is appropriate for this? Unlike typical platform devices

Re: "Virtual" Interrupts -- Need help please

2013-09-08 Thread Daniel Santos
On 09/07/2013 07:52 PM, Guenter Roeck wrote: On 09/07/2013 05:19 PM, Daniel Santos wrote: I've posted a number of requests for aid on this and have gotten very little responses and none that were helpful. I have spent at least 24 hours of research time on this and just a little direction

"Virtual" Interrupts -- Need help please

2013-09-07 Thread Daniel Santos
time), but that can wait. Any help *greatly* appreciated and thank you in advance! Daniel PS: If interested, my current driver here: https://github.com/daniel-santos/mcp2210-linux. I haven't sought review yet because I want to finish it first. -- To unsubscribe from this list: sen

Re: RESEND: Generating interrupts from a USB device driver?

2013-09-03 Thread Daniel Santos
IO drivers. https://github.com/daniel-santos/mcp2210-linux/ Anyway, look at the spi core, I think you want to tie into the spi_new_device() call in your usb driver, and start sending/receiving data through the SPI interfaces the spi core provides. I'm actually using the alternative to

Re: RESEND: Generating interrupts from a USB device driver? (USB to SPI/GPIO bridge)

2013-09-03 Thread Daniel Santos
On 09/02/2013 06:07 PM, Greg KH wrote: On Mon, Sep 02, 2013 at 05:46:58PM -0500, Daniel Santos wrote: Hello guys. I didn't get a response the last time so hopefully with 3.11 out I'll get one this time. I need to be able to generate interrupts from a USB device driver while ser

Re: RESEND: Generating interrupts from a USB device driver?

2013-09-02 Thread Daniel Santos
On 09/02/2013 06:07 PM, Greg KH wrote: On Mon, Sep 02, 2013 at 05:46:58PM -0500, Daniel Santos wrote: Hello guys. I didn't get a response the last time so hopefully with 3.11 out I'll get one this time. I need to be able to generate interrupts from a USB device driver while ser

RESEND: Generating interrupts from a USB device driver?

2013-09-02 Thread Daniel Santos
Hello guys. I didn't get a response the last time so hopefully with 3.11 out I'll get one this time. I need to be able to generate interrupts from a USB device driver while servicing the complete() function of an interrupt URB. While I realize that this may seem strange, the purpose is for a

USB-to-SPI bridge to spi protocol driver w/ interrupts?

2013-08-30 Thread Daniel Santos
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-usb" in the body of a message to majord...@vger.kernel.org More m

Re: URB completion order, normal behavior or bug?

2013-06-26 Thread Daniel Santos
On 06/25/2013 05:42 PM, Daniel Santos wrote: On 06/25/2013 09:45 AM, Alan Stern wrote: static __always_inline int init_endpoint(struct mcp2210_device *dev, const struct usb_host_endpoint *ep) { int is_dir_in = !!usb_endpoint_dir_in(&ep->desc);

Re: URB completion order, normal behavior or bug?

2013-06-25 Thread Daniel Santos
On 06/25/2013 09:45 AM, Alan Stern wrote: On Mon, 24 Jun 2013, Daniel Santos wrote: I submit an out URB (to rx my response) No, an OUT URB transfers data _out_ from the computer to the device. The response goes from the device _in_ to the computer. I sure do appreciate this because I was

Re: URB completion order, normal behavior or bug?

2013-06-24 Thread Daniel Santos
On 06/23/2013 09:08 PM, Alan Stern wrote: On Sun, 23 Jun 2013, Daniel Santos wrote: So I'm working on this MCP2210 driver which talks in 64-byte request/response pairs using interrupt URBs (it can be used with hid-generic, but I don't want to do that). I'm testing on a Raspb

Re: URB completion order, normal behavior or bug?

2013-06-24 Thread Daniel Santos
Well, our project needs more than two USB ports, and we were looking at the model A anyway, so maybe I should just find some nice USB hub chip and/or PIC that uses SPI and has a good stable driver and hook it up via the Pi's SPI interface? I know that sounds kinda stupid when it already has the U

Re: URB completion order, normal behavior or bug?

2013-06-23 Thread Daniel Santos
On 06/23/2013 01:43 PM, Greg KH wrote: On Sun, Jun 23, 2013 at 01:13:34PM -0500, Daniel Santos wrote: So I'm working on this MCP2210 driver which talks in 64-byte request/response pairs using interrupt URBs (it can be used with hid-generic, but I don't want to do that). I'

Re: URB completion order, normal behavior or bug?

2013-06-23 Thread Daniel Santos
Ahh, thank you both so very much for the responses, at least I know this isn't because of my code! :) On 06/23/2013 02:03 PM, Gordon Hollingworth wrote: It would be good to try it with the fiq_split branch of the kernel, that has much better scheduling to stop split transactions from going wron

URB completion order, normal behavior or bug?

2013-06-23 Thread Daniel Santos
So I'm working on this MCP2210 driver which talks in 64-byte request/response pairs using interrupt URBs (it can be used with hid-generic, but I don't want to do that). I'm testing on a Raspberry Pi Model B using the Raspbian 3.9.7 kernel. My usual order of things is: I submit an out URB (to r

Re: Question about "generic" HID devices

2013-05-20 Thread Daniel Santos
On 05/19/2013 10:12 AM, Alan Stern wrote: usb_kill_urb(dev->in.int_urb); Note that this call won't work if you are holding a spinlock. ooh, thanks so much for that. Troubleshooting bugs that only occur upon an unexpected failure is not fun! Using interrupt transfers for command

Re: Question about "generic" HID devices

2013-05-18 Thread Daniel Santos
First off, thanks for your helpful response! :) On 05/18/2013 10:53 AM, Alan Stern wrote: On Fri, 17 May 2013, Daniel Santos wrote: Hello. I'm working on a driver for a USB to SPI bridge chip (Microchip's MCP2210) that acts as a HID device (generic subclass). Of course, it can be

Re: Question about "generic" HID devices

2013-05-18 Thread Daniel Santos
The HID protocol is a separate specification, see the usb-if.org web site for it. Thank you, found it! It's quite a read and I think I see where I've gone wrong. I've made some terrible assumptions it would appear! :) That's ok, I've had fun and learned a lot thus far. Daniel -- To unsubs

Question about "generic" HID devices

2013-05-17 Thread Daniel Santos
Hello. I'm working on a driver for a USB to SPI bridge chip (Microchip's MCP2210) that acts as a HID device (generic subclass). Of course, it can be used from user-space via hid-generic, but I'm not really interested in that. I started this work from somebody else's implementation that was a H

Re: USB to SPI driver for MCP2210

2013-04-09 Thread Daniel Santos
On 04/09/2013 02:06 PM, Robert Schwebel wrote: On Tue, Apr 09, 2013 at 02:00:46PM -0500, Daniel Santos wrote: Well, we don't have the $3500 for a vendor id. :( I presume that others may do the same thing, hopefully mostly with DIY-type of projects. Do you know this one:

Re: USB to SPI driver for MCP2210

2013-04-09 Thread Daniel Santos
On 04/09/2013 12:07 PM, Felipe Balbi wrote: Hi, On Mon, Apr 08, 2013 at 03:59:00PM -0500, Daniel Santos wrote: My bother & I are working on a project where we're planning on using these inexpensive Microchip MCP2210 USB to SPI bridge w/ GPIO devices. Mathew King at Trilithic started

Re: USB to SPI driver for MCP2210

2013-04-09 Thread Daniel Santos
On 04/09/2013 12:15 AM, Greg KH wrote: On Mon, Apr 08, 2013 at 03:59:00PM -0500, Daniel Santos wrote: 1. Discover that the kernel already contains an abstraction layer for an x to SPI bridge device and that I just need to write an MCP2210 driver for it! We have lots of SPI drivers in the

USB to SPI driver for MCP2210

2013-04-08 Thread Daniel Santos
ignoring userspace options via generic-hid (there is already a user-space library for using this chip -- https://github.com/kerrydwong/MCP2210-Library). If somebody strongly feels that there's merit to doing this from userspace, please speak up. :) Other options, opinions and/or advice would be g