PATCH/RFC [0/3]: Fix suspend and other acceleromter issues
simon.kagstrom at gmail.com
Sun Nov 16 19:27:43 CET 2008
On Sun, 16 Nov 2008 17:59:52 +0000
Andy Green <andy at openmoko.com> wrote:
> As Simon suggests the DMA thing doesn't buy us much in practice, but
> if we want to get the lis302dl into mainline with an existing
> timer-based competing implementation already there the interrupt mode
> bitbang SPI would. So if we are going to blow out our mailreaders on
> this, let's do it discussing what moves us forward rather than
I've looked around a bit at the SPI implementation , in order to see
what would need to be done to make the interface usable from interrupt
What I'm currently thinking is to add a new function pointer to the
spi_master datastructure, being basically
int (*transfer_sync)(struct spi_device *spi, struct spi_message *mesg);
which would be implemented in spi_bitbang.c. This function should be
possible to base on bitbang_work (without looping over a list).
The next issue is bitbang->txrx_bufs, which is implemented in
s3c24xx_spi_txrx() in spi_s3c24xx.c. This function blocks and waits for
an interrupt and therefore needs to be reimplemented. Perhaps another
function pointer in the spi_bitbang structure then. It can be noted
that some other implementations have this function being synchronous
already, e.g., in omap_uwire.c (uwire_txrx).
I'm not surprised if this mail doesn't make any sense, and I guess
there are also more pressing issues in the openmoko project than
discussing how to get the accelerometer driver upstream.
 Thank you, Eclipse!
More information about the openmoko-kernel