Thanks Harald, On Fri, Dec 19, 2008 at 8:08 AM, Harald Welte <laforge@xxxxxxxxxxxx> wrote: > 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. The '8686 requires us to assert CS# and then hold it asserted for the entire transaction. The transaction is an arbitrary number of SPI transfers. Most host controllers cannot do this (they'll toggle CS# between individual transactions) and therefore we chose to not use the controller CS# line and use a GPIO. Can you suggest a different way to do this given the current SPI framework? > 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) The IRQ in question is a GPIO line asserted by the '8686 and it is not otherwise an SPI line, however I see now that it should be set in spi_board_info as you mention, we'll fix that. -Andrey -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html