Messages in this thread | | | From | David Brownell <> | Subject | Re: [spi-devel-general] [patch 05/14] mfd: PCAP2 driver | Date | Sat, 22 Nov 2008 20:59:59 -0800 |
| |
On Saturday 22 November 2008, Daniel Ribeiro wrote: > > - You should make ezx_pcap_write() and ezx_pcap_read() switch > > over to spi_write_then_read(), to ensure it's never doing > > DMA to/from the stack. I see a byte-order dependency too... > > I tried spi_write_then_read before, but it didn't work. I supposed it > was because it was doing 2 transfers as the second transfer rx_buf > always came zeroed.
You may have been using it wrong. Also, verify against current kernels ... there have been bugfixes to pxa2xx_spi.
> I see that commit > f9b90e39cbc5c4d6ef60022fd1f25d541df0aad1 changed it to do a single > transfer, so i will try it again.
Unless it needs the full duplex capability of SPI, then you should be able to make write_then_read work ... on the other hand, if you do need full duplex, then you should address the DMA. (And byteswapping, either way.)
> > - If you're going to mark the probe() as __devinit, then mark > > the remove() as __devexit and use __devexit_p() in the driver > > struct. > > Ok. Shouldn't i use __init instead?
I wouldn't. There are ways that the probe() could be called more than once -- e.g. after rebinding either of the relevant SPI drivers through sysfs, or after rmmod/modprobe of the SPI master controller driver -- and using an __init annotation would make that point to memory that's unlikely to still hold that code.
- Dave -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |