When there's no irq(this can be due to various reasons, for example,
no irq from HW support, or we just want to use poll solution, and so
on), falling back to poll is still better than no support at all.
patch1 makes the interrupt property in dt-binding optional
patch2 falls back to poll if there's no interrupt
since v1:
- adopt Andy's suggestion to simplified the code
Jisheng Zhang (2):
dt-bindings: serial: snps-dw-apb-uart: make interrupt optional
serial: 8250_dw: fall back to poll if there's no interrupt
.../devicetree/bindings/serial/snps-dw-apb-uart.yaml | 1 -
drivers/tty/serial/8250/8250_dw.c | 5 ++++-
2 files changed, 4 insertions(+), 2 deletions(-)
--
2.40.1
The driver fall back to poll style when there's no irq. "poll" still
looks better than no support.
Signed-off-by: Jisheng Zhang <[email protected]>
---
Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml | 1 -
1 file changed, 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
index 3862411c77b5..17c553123f96 100644
--- a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
+++ b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
@@ -117,7 +117,6 @@ properties:
required:
- compatible
- reg
- - interrupts
unevaluatedProperties: false
--
2.40.1
On Sun, Aug 06, 2023 at 12:20:11PM +0200, Greg Kroah-Hartman wrote:
> On Sun, Aug 06, 2023 at 05:20:54PM +0800, Jisheng Zhang wrote:
> > When there's no irq(this can be due to various reasons, for example,
> > no irq from HW support, or we just want to use poll solution, and so
> > on), falling back to poll is still better than no support at all.
>
> Ouch, really? Why not just fix the hardware instead?
>
Hi Greg,
The HW may be designed as that to save interrupt lines if the uart
is dedicated to debug purpose. I also see similar support in other
uart drivers, for example liteuart.c, altera_uart.c, altera_jtaguart.c
8250_ioc3.c and so on.
Thanks
On Sun, Aug 06, 2023 at 05:20:54PM +0800, Jisheng Zhang wrote:
> When there's no irq(this can be due to various reasons, for example,
> no irq from HW support, or we just want to use poll solution, and so
> on), falling back to poll is still better than no support at all.
Ouch, really? Why not just fix the hardware instead?