diff mbox series

[v2,1/2] dt-bindings: serial: sc16is7xx: Add description for polling mode

Message ID 20250106085051.50861-1-andre.werner@systec-electronic.com
State New
Headers show
Series [v2,1/2] dt-bindings: serial: sc16is7xx: Add description for polling mode | expand

Commit Message

Andre Werner Jan. 6, 2025, 8:50 a.m. UTC
Polling mode is enabled if the "interrupts" property is missing.
Thus, this commit deletes "interrupts" entry from "required" section
and adds a description for the fallback to polling mode at the
"interrupts" entry.

Signed-off-by: Andre Werner <andre.werner@systec-electronic.com>
---
 Documentation/devicetree/bindings/serial/nxp,sc16is7xx.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Andre Werner Jan. 7, 2025, 8:49 a.m. UTC | #1
Dear Krzysztof,

On Tue, 7 Jan 2025, Krzysztof Kozlowski wrote:

> On Mon, Jan 06, 2025 at 09:50:50AM +0100, Andre Werner wrote:
> > Polling mode is enabled if the "interrupts" property is missing.
> > Thus, this commit deletes "interrupts" entry from "required" section
> > and adds a description for the fallback to polling mode at the
> > "interrupts" entry.
>
> Can the device actually operate with interrupt line disconnected? I
> skimmed through datasheet and they did not mention that as a valid
> setup.

For polling mode the datasheet said:

In Polled mode (IER[3:0] = 0000) the status of the receiver and transmitter can be
checked by polling the Line Status Register (LSR). This mode is an alternative to the FIFO
Interrupt mode of operation where the status of the receiver and transmitter is
automatically known by means of interrupts sent to the CPU.

This is what the driver does. It polls the LSR according to poll period
used in the driver. Unfortunately, the internal TX and especially RX
buffer is very small. So we need to poll in a very short period.


>
> Best regards,
> Krzysztof
>
>

Regards,

Andre
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/serial/nxp,sc16is7xx.yaml b/Documentation/devicetree/bindings/serial/nxp,sc16is7xx.yaml
index 88871480018e..ab39b95dae40 100644
--- a/Documentation/devicetree/bindings/serial/nxp,sc16is7xx.yaml
+++ b/Documentation/devicetree/bindings/serial/nxp,sc16is7xx.yaml
@@ -23,6 +23,8 @@  properties:
     maxItems: 1
 
   interrupts:
+    description:
+      When missing, device driver uses polling instead.
     maxItems: 1
 
   clocks:
@@ -76,7 +78,6 @@  properties:
 required:
   - compatible
   - reg
-  - interrupts
 
 allOf:
   - $ref: /schemas/spi/spi-peripheral-props.yaml#