[PATCH v3] spi: New driver for Altera SPI

2011-01-16 Thread Thomas Chou
This patch adds a new SPI driver to support the Altera SOPC Builder SPI component. It uses the bitbanging library. Signed-off-by: Thomas Chou --- v2 add devicetree support v3 remove platform header, as Grant suggested. no irq resource means polling. drivers/spi/Kconfig |6 + drivers

Re: [PATCH v3] spi: New driver for Altera SPI

2011-01-16 Thread Sinan Akman
Thomas Chou wrote: [...] > + > +static int altera_spi_txrx(struct spi_device *spi, struct spi_transfer *t) > +{ > + struct altera_spi *hw = to_hw(spi); > + > + hw->tx = t->tx_buf; > + hw->rx = t->rx_buf; > + hw->count = 0; > + hw->bytes_per_word = (t->bits_per_word ? : spi->bits_per_word

Re: [PATCH v3] spi: New driver for Altera SPI

2011-01-17 Thread Thomas Chou
On 01/17/2011 03:27 PM, Sinan Akman wrote: >> + if (hw->irq >= 0) { >> + init_completion(&hw->done); > > I think you init this twice, once in altera_spi_probe > below as well. Hi Sinan, Thanks. I will remove this one. - Thomas

Re: [PATCH v3] spi: New driver for Altera SPI

2011-01-18 Thread Thomas Chou
On 01/17/2011 03:27 PM, Sinan Akman wrote: >> + if (hw->irq >= 0) { >> + init_completion(&hw->done); > > I think you init this twice, once in altera_spi_probe > below as well. I will remove this one, too. Thank you again. - Thomas -