From: <Dharma.B@microchip.com>
To: <conor@kernel.org>
Cc: <robh@kernel.org>, <tglx@linutronix.de>,
<krzysztof.kozlowski+dt@linaro.org>, <conor+dt@kernel.org>,
<Nicolas.Ferre@microchip.com>, <alexandre.belloni@bootlin.com>,
<claudiu.beznea@tuxon.dev>, <linux-kernel@vger.kernel.org>,
<devicetree@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<Conor.Dooley@microchip.com>
Subject: Re: [PATCH v3] dt-bindings: interrupt-controller: Convert Atmel AIC to json-schema
Date: Thu, 22 Feb 2024 08:59:28 +0000 [thread overview]
Message-ID: <01916920-5ad3-4f6b-a53d-649dccec6999@microchip.com> (raw)
In-Reply-To: <20240222-stiffly-squeeze-b4ec2b49a4fe@spud>
On 22/02/24 2:26 pm, Conor Dooley wrote:
>> diff --git a/Documentation/devicetree/bindings/interrupt-controller/atmel,aic.yaml b/Documentation/devicetree/bindings/interrupt-controller/atmel,aic.yaml
>> new file mode 100644
>> index 000000000000..0d51bd78bf2b
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/interrupt-controller/atmel,aic.yaml
>> @@ -0,0 +1,89 @@
>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id:http://devicetree.org/schemas/interrupt-controller/atmel,aic.yaml#
>> +$schema:http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Advanced Interrupt Controller (AIC)
>> +
>> +maintainers:
>> + - Nicolas Ferre<nicolas.ferre@microchip.com>
>> + - Dharma balasubiramani<dharma.b@microchip.com>
>> +
>> +description:
>> + The Advanced Interrupt Controller (AIC) is an 8-level priority, individually
>> + maskable, vectored interrupt controller providing handling of up to one
>> + hundred and twenty-eight interrupt sources.
>> +
>> +allOf:
>> + - $ref: /schemas/interrupt-controller.yaml#
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + const: atmel,at91rm9200-aic
>> + then:
>> + properties:
>> + atmel,external-irqs:
>> + minItems: 1
>> + maxItems: 7
>> + else:
>> + properties:
>> + atmel,external-irqs:
>> + minItems: 1
>> + maxItems: 1
> When there's property restrictions being applied, move the allof down
> to...
>
>> +
>> +properties:
>> + compatible:
>> + enum:
>> + - atmel,at91rm9200-aic
>> + - atmel,sama5d2-aic
>> + - atmel,sama5d3-aic
>> + - atmel,sama5d4-aic
>> + - microchip,sam9x60-aic
>> +
>> + reg:
>> + maxItems: 1
>> +
>> + interrupt-controller: true
>> +
>> + "#interrupt-cells":
>> + const: 3
>> + description: |
>> + The 1st cell is the IRQ number (Peripheral IDentifier on datasheet).
>> + The 2nd cell specifies flags:
>> + bits[3:0] trigger type and level flags:
>> + 1 = low-to-high edge triggered.
>> + 2 = high-to-low edge triggered.
>> + 4 = active high level-sensitive.
>> + 8 = active low level-sensitive.
>> + Valid combinations: 1, 2, 3, 4, 8.
>> + Default for internal sources: 4 (active high).
>> + The 3rd cell specifies irq priority from 0 (lowest) to 7 (highest).
>> +
>> + interrupts:
>> + maxItems: 1
>> +
>> + atmel,external-irqs:
>> + $ref: /schemas/types.yaml#/definitions/uint32-array
>> + description: u32 array of external irqs.
> ...here. Both work, but seeing the restrictions before you see any of
> the properties is not the most understandable.
Understood, I will move it here.
>
> Cheers,
> Conor.
>
>> +required:
>> + - compatible
>> + - reg
>> + - interrupt-controller
>> + - "#interrupt-cells"
>> + - atmel,external-irqs
>> +
>> +unevaluatedProperties: false
>> +
>> +examples:
>> + - |
>> + interrupt-controller@fffff000 {
>> + compatible = "atmel,at91rm9200-aic";
>> + reg = <0xfffff000 0x200>;
>> + interrupt-controller;
>> + #interrupt-cells = <3>;
>> + atmel,external-irqs = <31>;
>> + };
>> +...
>>
>> base-commit: 4f5e5092fdbf5cec6bedc19fbe69cce4f5f08372
>> --
>> 2.25.1
--
With Best Regards,
Dharma B.
prev parent reply other threads:[~2024-02-22 9:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-22 3:51 [PATCH v3] dt-bindings: interrupt-controller: Convert Atmel AIC to json-schema Dharma Balasubiramani
2024-02-22 8:56 ` Conor Dooley
2024-02-22 8:59 ` Dharma.B [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=01916920-5ad3-4f6b-a53d-649dccec6999@microchip.com \
--to=dharma.b@microchip.com \
--cc=Conor.Dooley@microchip.com \
--cc=Nicolas.Ferre@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=conor+dt@kernel.org \
--cc=conor@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox