diff mbox series

[v4,1/5] dt-bindings: interrupt-controller: loongson,liointc: Standardize the naming of 'loongson,parent-int-map'

Message ID 84cb3df17eee993fc6a10e965b3f438f9034d2de.1699521866.git.zhoubinbin@loongson.cn (mailing list archive)
State Superseded
Headers show
Series dt-bindings: interrupt-controller: Fix some loongson,liointc warnings | expand

Commit Message

Binbin Zhou Nov. 13, 2023, 2:36 a.m. UTC
Since the 'loongson,parent_int_map' attribute naming is non-standard, we
should use 'loongson,parent-int-map' instead.
Also, 'loongson,parent_int_map' will be marked as deprecated.

Acked-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
---
 .../interrupt-controller/loongson,liointc.yaml    | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

Comments

Rob Herring (Arm) Nov. 16, 2023, 5:39 p.m. UTC | #1
On Mon, Nov 13, 2023 at 10:36:21AM +0800, Binbin Zhou wrote:
> Since the 'loongson,parent_int_map' attribute naming is non-standard, we
> should use 'loongson,parent-int-map' instead.
> Also, 'loongson,parent_int_map' will be marked as deprecated.

Again, as I said last time, it is not worth adding 
'loongson,parent-int-map' and having to support both forms in the kernel 
forever. If you can define a time that we keep 'loongson,parent_int_map' 
that's less than "forever", then may be it would be worth changing.

To put this another way, using '-' instead of '_' is for *new* bindings, 
not existing users.

Rob
Binbin Zhou Nov. 17, 2023, 9:05 a.m. UTC | #2
On Thu, Nov 16, 2023 at 11:39 PM Rob Herring <robh@kernel.org> wrote:
>
> On Mon, Nov 13, 2023 at 10:36:21AM +0800, Binbin Zhou wrote:
> > Since the 'loongson,parent_int_map' attribute naming is non-standard, we
> > should use 'loongson,parent-int-map' instead.
> > Also, 'loongson,parent_int_map' will be marked as deprecated.
>
> Again, as I said last time, it is not worth adding
> 'loongson,parent-int-map' and having to support both forms in the kernel
> forever. If you can define a time that we keep 'loongson,parent_int_map'
> that's less than "forever", then may be it would be worth changing.
>
> To put this another way, using '-' instead of '_' is for *new* bindings,
> not existing users.
>
OK, I see, and I will fix it in the next version.

Thanks.
Binbin

> Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml b/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
index 00b570c82903..0d9511b8a792 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
+++ b/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
@@ -55,6 +55,7 @@  properties:
     const: 2
 
   loongson,parent_int_map:
+    deprecated: true
     description: |
       This property points how the children interrupts will be mapped into CPU
       interrupt lines. Each cell refers to a parent interrupt line from 0 to 3
@@ -65,14 +66,21 @@  properties:
     minItems: 4
     maxItems: 4
 
+  loongson,parent-int-map:
+    description: |
+      Exactly the same as 'loongson,parent_int_map', we just replaced the
+      unstandardized use of underscores.
+    $ref: /schemas/types.yaml#/definitions/uint32-array
+    minItems: 4
+    maxItems: 4
+
 required:
   - compatible
   - reg
   - interrupts
   - interrupt-controller
   - '#interrupt-cells'
-  - loongson,parent_int_map
-
+  - loongson,parent-int-map
 
 unevaluatedProperties: false
 
@@ -109,11 +117,10 @@  examples:
       interrupts = <2>, <3>;
       interrupt-names = "int0", "int1";
 
-      loongson,parent_int_map = <0xf0ffffff>, /* int0 */
+      loongson,parent-int-map = <0xf0ffffff>, /* int0 */
                                 <0x0f000000>, /* int1 */
                                 <0x00000000>, /* int2 */
                                 <0x00000000>; /* int3 */
-
     };
 
 ...