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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5226342E.70804@att.net>
Date:	Tue, 03 Sep 2013 14:10:38 -0500
From:	Daniel Santos <danielfsantos@....net>
To:	Greg KH <gregkh@...uxfoundation.org>
CC:	LKML <linux-kernel@...r.kernel.org>,
	linux-gpio <linux-gpio@...r.kernel.org>,
	linux-usb <linux-usb@...r.kernel.org>,
	linux-spi <linux-spi@...r.kernel.org>
Subject: Re: RESEND: Generating interrupts from a USB device driver?


On 09/03/2013 12:59 PM, Greg KH wrote:
> Hm, I thought we used to have some of them, I guess people have been
> saying they would write a driver for this type of hardware for a long
> time now :(

Well, on the bright side, we have one now, albeit in a "this is my first 
driver that nobody has reviewed yet" state. :)  It works (even on RPi -- 
well, mostly).  As-is, it has a fair TODO & fix list, which I'm sure 
will grow rapidly with some review. I hope that as I learn the kernel 
better, I can generalize parts of this into some re-usable lib for other 
USB-to-SPI/I2C/GPIO 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 that call, which is the 
spi_alloc_device() / spi_add_device() pair as I'm not using struct 
spi_board_info at all since it doesn't (currently) have even half of the 
fields I need for each device. However, struct spi_device does have the 
two void * fields controller_data and controller_state -- I suppose I 
can use those to pass a pointer to a add_notify() type of function.  I 
was just trying to seek a more generic, re-usable mechanism, but this 
should at least work for now.

> The Linux SPI mailing list should be able to help you out a lot more
> here than I can.
>
> greg k-h

Thanks again for your help!
--
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