[1/2] dt-bindings: serial: snps-dw-apb-uart: make interrupt optional

Message ID 20230802150545.3742-2-jszhang@kernel.org
State New
Headers
Series serial: 8250_dw: fall back to poll if there's no interrupt |

Commit Message

Jisheng Zhang Aug. 2, 2023, 3:05 p.m. UTC
  The driver fall back to poll style when there's no irq. "poll" still
looks better than no support.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml | 1 -
 1 file changed, 1 deletion(-)
  

Comments

Conor Dooley Aug. 2, 2023, 3:43 p.m. UTC | #1
On Wed, Aug 02, 2023 at 11:05:44PM +0800, Jisheng Zhang wrote:
> The driver fall back to poll style when there's no irq. "poll" still
> looks better than no support.

What is the user for this where the interrupt is not actually wired up
in the hardware?

> 
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> ---
>  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
>
  
Andy Shevchenko Aug. 2, 2023, 9:57 p.m. UTC | #2
On Wed, Aug 02, 2023 at 04:43:48PM +0100, Conor Dooley wrote:
> On Wed, Aug 02, 2023 at 11:05:44PM +0800, Jisheng Zhang wrote:
> > The driver fall back to poll style when there's no irq. "poll" still
> > looks better than no support.
> 
> What is the user for this where the interrupt is not actually wired up
> in the hardware?

FYI: kernel console doesn't use interrupts, so for example it might be
the debug port. Note, I have no idea of the Zhang's case, just my assumption.
  
Conor Dooley Aug. 2, 2023, 10:53 p.m. UTC | #3
On Thu, Aug 03, 2023 at 12:57:44AM +0300, Andy Shevchenko wrote:
> On Wed, Aug 02, 2023 at 04:43:48PM +0100, Conor Dooley wrote:
> > On Wed, Aug 02, 2023 at 11:05:44PM +0800, Jisheng Zhang wrote:
> > > The driver fall back to poll style when there's no irq. "poll" still
> > > looks better than no support.
> > 
> > What is the user for this where the interrupt is not actually wired up
> > in the hardware?
> 
> FYI: kernel console doesn't use interrupts, so for example it might be
> the debug port. Note, I have no idea of the Zhang's case, just my assumption.

I'm less interested in what the software is doing, it's what the device 
that has not connected the interrupt is that I am curious about.
  
Andy Shevchenko Aug. 3, 2023, 11:40 a.m. UTC | #4
On Wed, Aug 02, 2023 at 11:53:59PM +0100, Conor Dooley wrote:
> On Thu, Aug 03, 2023 at 12:57:44AM +0300, Andy Shevchenko wrote:
> > On Wed, Aug 02, 2023 at 04:43:48PM +0100, Conor Dooley wrote:
> > > On Wed, Aug 02, 2023 at 11:05:44PM +0800, Jisheng Zhang wrote:
> > > > The driver fall back to poll style when there's no irq. "poll" still
> > > > looks better than no support.
> > > 
> > > What is the user for this where the interrupt is not actually wired up
> > > in the hardware?
> > 
> > FYI: kernel console doesn't use interrupts, so for example it might be
> > the debug port. Note, I have no idea of the Zhang's case, just my assumption.
> 
> I'm less interested in what the software is doing, it's what the device 
> that has not connected the interrupt is that I am curious about.

As I said. The hw may be purely for debugging purposes (and yes, I have heard
about such a hardware).
  
Jisheng Zhang Aug. 6, 2023, 9:40 a.m. UTC | #5
On Thu, Aug 03, 2023 at 02:40:05PM +0300, Andy Shevchenko wrote:
> On Wed, Aug 02, 2023 at 11:53:59PM +0100, Conor Dooley wrote:
> > On Thu, Aug 03, 2023 at 12:57:44AM +0300, Andy Shevchenko wrote:
> > > On Wed, Aug 02, 2023 at 04:43:48PM +0100, Conor Dooley wrote:
> > > > On Wed, Aug 02, 2023 at 11:05:44PM +0800, Jisheng Zhang wrote:
> > > > > The driver fall back to poll style when there's no irq. "poll" still
> > > > > looks better than no support.
> > > > 
> > > > What is the user for this where the interrupt is not actually wired up
> > > > in the hardware?
> > > 
> > > FYI: kernel console doesn't use interrupts, so for example it might be
> > > the debug port. Note, I have no idea of the Zhang's case, just my assumption.

Hi Conor, Andy,

Andy's assumption about the uart dedicated for debug purpose is true, since
it's for log only, so no interrupt need at all. We can also see such no
irq support in litex uart driver(liteuart.c) and even a 8250
variant(8250_ioc3.c).

Thanks
> > 
> > I'm less interested in what the software is doing, it's what the device 
> > that has not connected the interrupt is that I am curious about.
> 
> As I said. The hw may be purely for debugging purposes (and yes, I have heard
> about such a hardware).
> 
> -- 
> With Best Regards,
> Andy Shevchenko
> 
>
  

Patch

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