From: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
To: Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>
Cc: linux-spi@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux@ew.tq-group.com,
Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Subject: [PATCH 2/2] spi: add support for generic linux,use-rt-queue flag
Date: Fri, 2 Jun 2023 13:52:01 +0200 [thread overview]
Message-ID: <20230602115201.415718-2-matthias.schiffer@ew.tq-group.com> (raw)
In-Reply-To: <20230602115201.415718-1-matthias.schiffer@ew.tq-group.com>
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@ew.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/
next prev parent reply other threads:[~2023-06-02 11:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-02 11:52 [PATCH 1/2] spi: dt-bindings: introduce linux,use-rt-queue flag Matthias Schiffer
2023-06-02 11:52 ` Matthias Schiffer [this message]
2023-06-02 12:22 ` Mark Brown
2023-06-06 14:37 ` Linus Walleij
2023-06-06 14:44 ` Mark Brown
2023-06-07 12:55 ` Matthias Schiffer
2023-06-07 14:21 ` Mark Brown
2023-06-07 14:28 ` Krzysztof Kozlowski
2023-06-09 7:41 ` Linus Walleij
2023-06-09 8:15 ` Alexander Stein
2023-06-09 8:42 ` Linus Walleij
2023-06-09 9:13 ` Alexander Stein
2023-06-09 9:22 ` Linus Walleij
2023-06-09 9:34 ` Mark Brown
2023-06-09 9:33 ` Mark Brown
2023-06-14 19:30 ` Rob Herring
2023-06-14 19:59 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230602115201.415718-2-matthias.schiffer@ew.tq-group.com \
--to=matthias.schiffer@ew.tq-group.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=linux@ew.tq-group.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).