[PATCH 3/3] libertas: if_spi, driver for libertas GSPI devices

Harald Welte laforge at gnumonks.org
Fri Dec 19 11:08:36 EST 2008


Hi Colin,

thanks a lot for your patch, it is greatly appreciated.

Stefan Schmidt (see Cc) and myself are currently working on using a 8686
attached t o SPI of a S3C2442 SoC.

Let me make some comments on the actual code:

On Mon, Dec 15, 2008 at 07:27:32PM -0800, Colin McCabe wrote:

> +struct libertas_spi_platform_data {
> +	u16 host_irq_num;
> +
> +	u16 gpio_cs;
> +};

> +	gpio_set_value(card->gpio_cs, 0); /* assert CS */
> +	gpio_set_value(card->gpio_cs, 1); /* drop CS */

Typically, in the Linux SPI framework, it is the SPI host controller
driver that exercises the chipselect GPIO, not the client (device) driver.

Also, the host_irq_num is typically passed by the '.irq' member of
spi_board_info structure, since it is board specific data (see e.g.
arch/arm/mach-pxa/spitz.c)

Unless there is a specific reason that I'm missing, it would probably be a
good idea to follow the general conventions on this.

Cheers,
-- 
- Harald Welte <laforge at gnumonks.org>           http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.infradead.org/pipermail/libertas-dev/attachments/20081219/d1779b36/attachment.bin 


More information about the libertas-dev mailing list