[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230602115201.415718-2-matthias.schiffer@ew.tq-group.com>
Date: Fri, 2 Jun 2023 13:52:01 +0200
From: Matthias Schiffer <matthias.schiffer@...tq-group.com>
To: Mark Brown <broonie@...nel.org>, Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>
Cc: linux-spi@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux@...tq-group.com,
Matthias Schiffer <matthias.schiffer@...tq-group.com>
Subject: [PATCH 2/2] spi: add support for generic linux,use-rt-queue flag
Instead of requiring per-driver support to handle the message queue with
realtime priority, add handling for a linux,use-rt-queue DT flag to the
generic SPI controller initialization.
Signed-off-by: Matthias Schiffer <matthias.schiffer@...tq-group.com>
---
drivers/spi/spi.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 9291b2a0e8871..f069f1aef5378 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -3185,6 +3185,11 @@ int spi_register_controller(struct spi_controller *ctlr)
ctlr->mode_bits |= SPI_CS_HIGH;
}
+ /* Run message pump with realtime priority */
+ if (ctlr->dev.of_node &&
+ of_property_read_bool(ctlr->dev.of_node, "linux,use-rt-queue"))
+ ctlr->rt = true;
+
/*
* Even if it's just one always-selected device, there must
* be at least one chipselect.
--
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/
Powered by blists - more mailing lists