OSDN Git Service

spi: atmel: Reduce spin lock usage
authorDan Sneddon <dan.sneddon@microchip.com>
Wed, 2 Jun 2021 16:08:15 +0000 (09:08 -0700)
committerMark Brown <broonie@kernel.org>
Thu, 3 Jun 2021 13:05:00 +0000 (14:05 +0100)
commit4abd641501663493764949f045ebf9f8c0da0307
tree1a47ad646ffe4e05ca2919ae97aabf6e382a858a
parent5fa5e6dec762305a783e918a90a05369fc10e346
spi: atmel: Reduce spin lock usage

The current implementation of the driver holds a spin lock for the
duration of the transfer, releasing it only to enable interrupts for
short periods of time.  As this would prevent any interrupt from
happening, this could cause system performance issues every time a SPI
message is sent.  Since the spi core now handles message syncronization
we can reduce the amount of time the spin-lock is held to the regions
where both the calling thread and the interrupt might interract.

Signed-off-by: Dan Sneddon <dan.sneddon@microchip.com>
Link: https://lore.kernel.org/r/20210602160816.4890-2-dan.sneddon@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-atmel.c