Re: [spi-devel-general] Re: question on spi_bitbang

From: David Brownell
Date: Fri Mar 31 2006 - 17:17:08 EST


On Friday 31 March 2006 2:11 pm, Kumar Gala wrote:

> So I give a new question. Any issue with adding a rx & tx completion
> to spi_bitbang?

What do you mean?

> In my HW I get an interrupt when the transmitter is
> done transmitting and one when the receiver is done receiving. I
> need some way to synchronize and wait for both events to occur before
> continuing on in txrx_word().

You can't return from txrx_word() before the RX event, since the
return value is the word that was shifted in. So if you use IRQs
to synchronize there (rather than polling a status register), all
that would be internal to your code.

- Dave
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/