spi: Allow SPI devices to request the pumping thread be realtime
authorDouglas Anderson <dianders@chromium.org>
Wed, 15 May 2019 16:48:12 +0000 (09:48 -0700)
committerMark Brown <broonie@kernel.org>
Thu, 23 May 2019 13:44:02 +0000 (14:44 +0100)
commit924b5867e7bd6a6a98014f0517b747465b108011
tree5c66c777dc99113fc4340627ae897a855b5961fc
parenta188339ca5a396acc588e5851ed7e19f66b0ebd9
spi: Allow SPI devices to request the pumping thread be realtime

Right now the only way to get the SPI pumping thread bumped up to
realtime priority is for the controller to request it.  However it may
be that the controller works fine with the normal priority but
communication to a particular SPI device on the bus needs realtime
priority.

Let's add a way for devices to request realtime priority when they set
themselves up.

NOTE: this will just affect the priority of transfers that end up on
the SPI core's pumping thread.  In many cases transfers happen in the
context of the caller so if you need realtime priority for all
transfers you should ensure the calling context is also realtime
priority.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi.c
include/linux/spi/spi.h