diff mbox series

[1/2] spi: dt-bindings: introduce linux,use-rt-queue flag

Message ID 20230602115201.415718-1-matthias.schiffer@ew.tq-group.com
State New
Headers show
Series [1/2] spi: dt-bindings: introduce linux,use-rt-queue flag | expand

Commit Message

Matthias Schiffer June 2, 2023, 11:52 a.m. UTC
We have seen a number of downstream patches that allow enabling the
realtime feature of the SPI subsystem to reduce latency. These were
usually implemented for a specific SPI driver, even though the actual
handling of the rt flag is happening in the generic SPI controller code.

Introduce a generic linux,use-rt-queue flag that can be used with any
controller driver. The now redundant driver-specific pl022,rt flag is
marked as deprecated.

Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
---
 Documentation/devicetree/bindings/spi/spi-controller.yaml | 6 ++++++
 Documentation/devicetree/bindings/spi/spi-pl022.yaml      | 4 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)

Comments

Mark Brown June 2, 2023, 12:22 p.m. UTC | #1
On Fri, Jun 02, 2023 at 01:52:00PM +0200, Matthias Schiffer wrote:
> We have seen a number of downstream patches that allow enabling the
> realtime feature of the SPI subsystem to reduce latency. These were
> usually implemented for a specific SPI driver, even though the actual
> handling of the rt flag is happening in the generic SPI controller code.
> 
> Introduce a generic linux,use-rt-queue flag that can be used with any
> controller driver. The now redundant driver-specific pl022,rt flag is
> marked as deprecated.

This is clearly OS specific tuning so out of scope for DT...
Rob Herring (Arm) June 14, 2023, 7:30 p.m. UTC | #2
On Tue, Jun 06, 2023 at 04:37:08PM +0200, Linus Walleij wrote:
> On Fri, Jun 2, 2023 at 2:22 PM Mark Brown <broonie@kernel.org> wrote:
> > On Fri, Jun 02, 2023 at 01:52:00PM +0200, Matthias Schiffer wrote:
> 
> > > We have seen a number of downstream patches that allow enabling the
> > > realtime feature of the SPI subsystem to reduce latency. These were
> > > usually implemented for a specific SPI driver, even though the actual
> > > handling of the rt flag is happening in the generic SPI controller code.
> > >
> > > Introduce a generic linux,use-rt-queue flag that can be used with any
> > > controller driver. The now redundant driver-specific pl022,rt flag is
> > > marked as deprecated.
> >
> > This is clearly OS specific tuning so out of scope for DT...
> 
> In a sense, but to be fair anything prefixed linux,* is out of scope for DT,
> Documentation/devicetree/bindings/input/matrix-keymap.yaml being
> the most obvious offender.
> 
> On the other hand I think the DT maintainers said it is basically fine
> to use undocumented DT properties for this kind of thing. Having
> completely undocumented DT properties might seem evil in another
> sense, but I think Apple does nothing but...

I don't don't know where you got that impression. I'm fine with them in 
the sense that I don't look at downstream and anything goes there.

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/spi/spi-controller.yaml b/Documentation/devicetree/bindings/spi/spi-controller.yaml
index 524f6fe8c27b4..a24b4ea87443b 100644
--- a/Documentation/devicetree/bindings/spi/spi-controller.yaml
+++ b/Documentation/devicetree/bindings/spi/spi-controller.yaml
@@ -79,6 +79,12 @@  properties:
     description:
       The SPI controller acts as a slave, instead of a master.
 
+  linux,use-rt-queue:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description:
+      Indicates that the controller should run the message pump with realtime
+      priority to minimise the transfer latency on the bus.
+
   slave:
     type: object
 
diff --git a/Documentation/devicetree/bindings/spi/spi-pl022.yaml b/Documentation/devicetree/bindings/spi/spi-pl022.yaml
index 91e540a92fafe..3c43fcc007e1f 100644
--- a/Documentation/devicetree/bindings/spi/spi-pl022.yaml
+++ b/Documentation/devicetree/bindings/spi/spi-pl022.yaml
@@ -49,8 +49,10 @@  properties:
 
   pl022,rt:
     description: indicates the controller should run the message pump with realtime
-      priority to minimise the transfer latency on the bus (boolean)
+      priority to minimise the transfer latency on the bus (deprecated, use the
+      generic linux,use-rt-queue property)
     type: boolean
+    deprecated: true
 
   dmas:
     description: