mbox series

[v2,0/2] Realtek RTL838x/RTL839x IRQ driver

Message ID 20210104131755.2979203-1-bert@biot.com
Headers show
Series Realtek RTL838x/RTL839x IRQ driver | expand

Message

Bert Vermeulen Jan. 4, 2021, 1:17 p.m. UTC
v2:
- Addressed all comments by Marc Zyngier.
- Moved interrupt routing symbols to device tree interrupt-map. Parsing
  is done similar to the renesas,rza1-irqc driver.

Bert Vermeulen (2):
  dt-bindings: interrupt-controller: Add Realtek RTL838x/RTL839x support
  irqchip: Add support for Realtek RTL838x/RTL839x IRQ controller

 .../realtek,rtl-intc.yaml                     |  57 ++++++
 drivers/irqchip/Makefile                      |   1 +
 drivers/irqchip/irq-realtek-rtl.c             | 180 ++++++++++++++++++
 3 files changed, 238 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/realtek,rtl-intc.yaml
 create mode 100644 drivers/irqchip/irq-realtek-rtl.c

Comments

Rob Herring Jan. 5, 2021, 5:04 p.m. UTC | #1
On Mon, 04 Jan 2021 14:17:54 +0100, Bert Vermeulen wrote:
> Signed-off-by: Bert Vermeulen <bert@biot.com>

> ---

>  .../realtek,rtl-intc.yaml                     | 57 +++++++++++++++++++

>  1 file changed, 57 insertions(+)

>  create mode 100644 Documentation/devicetree/bindings/interrupt-controller/realtek,rtl-intc.yaml

> 


My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/interrupt-controller/realtek,rtl-intc.yaml: properties: 'interrupt-map-mask' is a dependency of 'interrupt-map'
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/interrupt-controller/realtek,rtl-intc.yaml: ignoring, error in schema: properties
warning: no schema found in file: ./Documentation/devicetree/bindings/interrupt-controller/realtek,rtl-intc.yaml
Error: Documentation/devicetree/bindings/interrupt-controller/realtek,rtl-intc.example.dts:30.5-6 syntax error
FATAL ERROR: Unable to parse input tree
make[1]: *** [scripts/Makefile.lib:344: Documentation/devicetree/bindings/interrupt-controller/realtek,rtl-intc.example.dt.yaml] Error 1
make: *** [Makefile:1370: dt_binding_check] Error 2

See https://patchwork.ozlabs.org/patch/1422078

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.
Bert Vermeulen Jan. 6, 2021, 9:54 a.m. UTC | #2
On 1/5/21 6:04 PM, Rob Herring wrote:
> On Mon, 04 Jan 2021 14:17:54 +0100, Bert Vermeulen wrote:

>> Signed-off-by: Bert Vermeulen <bert@biot.com>

>> ---

>>  .../realtek,rtl-intc.yaml                     | 57 +++++++++++++++++++

>>  1 file changed, 57 insertions(+)

>>  create mode 100644 Documentation/devicetree/bindings/interrupt-controller/realtek,rtl-intc.yaml

>> 

> 

> My bot found errors running 'make dt_binding_check' on your patch:


I fixed the syntax error that caused this to fail. But running the test now 
produces some errors that are not so obvious:

   interrupt-controller@3000: interrupt-map: [[31, 4294967295, 2], [30, 
4294967295, 1], [29, 4294967295, 5]] is too short

Not sure where this comes from, but running dt-validate -v gives this:

   Failed validating 'minItems' in schema['properties']['interrupt-map']:
     {'maxItems': 24, 'minItems': 24}

Where did that 24 come from? I don't even have 24 initerrupts to map :-)

Another error is this:

   interrupt-controller@3000: 'interrupt-map-mask' is a dependency of 
'interrupt-map'

I can see this in your dtschema package's schemas/interrupt-controller.yaml 
where it's defined as a dependency, but why? I don't need that property.


-- 
Bert Vermeulen
bert@biot.com
Rob Herring Jan. 6, 2021, 3:19 p.m. UTC | #3
On Wed, Jan 6, 2021 at 2:55 AM Bert Vermeulen <bert@biot.com> wrote:
>

> On 1/5/21 6:04 PM, Rob Herring wrote:

> > On Mon, 04 Jan 2021 14:17:54 +0100, Bert Vermeulen wrote:

> >> Signed-off-by: Bert Vermeulen <bert@biot.com>

> >> ---

> >>  .../realtek,rtl-intc.yaml                     | 57 +++++++++++++++++++

> >>  1 file changed, 57 insertions(+)

> >>  create mode 100644 Documentation/devicetree/bindings/interrupt-controller/realtek,rtl-intc.yaml

> >>

> >

> > My bot found errors running 'make dt_binding_check' on your patch:

>

> I fixed the syntax error that caused this to fail. But running the test now

> produces some errors that are not so obvious:

>

>    interrupt-controller@3000: interrupt-map: [[31, 4294967295, 2], [30,

> 4294967295, 1], [29, 4294967295, 5]] is too short

>

> Not sure where this comes from, but running dt-validate -v gives this:

>

>    Failed validating 'minItems' in schema['properties']['interrupt-map']:

>      {'maxItems': 24, 'minItems': 24}

>

> Where did that 24 come from? I don't even have 24 initerrupts to map :-)


If you don't define minItems, then the default is the same as
maxItems. So you need to set 'minItems'.

>

> Another error is this:

>

>    interrupt-controller@3000: 'interrupt-map-mask' is a dependency of

> 'interrupt-map'

>

> I can see this in your dtschema package's schemas/interrupt-controller.yaml

> where it's defined as a dependency, but why? I don't need that property.


This should be the other way around. I'll fix it.

Rob