[PATCH V2] spi: bcm2835: enabling polling mode for transfers shorter than 30us

Mark Brown broonie at kernel.org
Wed Apr 15 11:58:24 PDT 2015


On Tue, Apr 14, 2015 at 04:29:49PM +0200, Martin Sperl wrote:

> Approaches I can think of to solve the issue:
> * accept this fact as a reality - drivers should be able to handle
>   such situations in a well-behaved manner
> * remove polling mode completely from the spi-bcm2835 driver
> * remove the timeout code when polling
> * make the timeout a warning
> * set the timeout to something much longer say 200ms
> * stop the system from interrupting (either scheduler or interrupt
>   handler) for the next 30us or the calculated timeout-period.
>   Maybe by holding a spinlock (or similar) / disabling interrupts /
>   ...?
> * others

> So the question is: which approach should get implemented?

Running without a timeout doesn't feel safe - the standard thing here is
to busy wait for a short period then fall back to something that sleeps
if that times out.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-rpi-kernel/attachments/20150415/498e53a4/attachment.sig>


More information about the linux-rpi-kernel mailing list