dt-bindings: media: meson-ir: Convert Amlogic Meson IR controller binding

Message ID a91e3a8e-7ef1-70bb-f6be-01a9a90c0e05@gmail.com (mailing list archive)
State Rejected
Delegated to: Sean Young
Headers
Series dt-bindings: media: meson-ir: Convert Amlogic Meson IR controller binding |

Commit Message

Heiner Kallweit Feb. 12, 2023, 4:51 p.m. UTC
  Convert Amlogic Meson IR controller binding to yaml.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 .../devicetree/bindings/media/meson-ir.txt    | 20 ---------
 .../devicetree/bindings/media/meson-ir.yaml   | 45 +++++++++++++++++++
 2 files changed, 45 insertions(+), 20 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/media/meson-ir.txt
 create mode 100644 Documentation/devicetree/bindings/media/meson-ir.yaml
  

Comments

Neil Armstrong Feb. 13, 2023, 9:02 a.m. UTC | #1
Hi Heiner,

On 12/02/2023 17:51, Heiner Kallweit wrote:
> Convert Amlogic Meson IR controller binding to yaml.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> ---
>   .../devicetree/bindings/media/meson-ir.txt    | 20 ---------
>   .../devicetree/bindings/media/meson-ir.yaml   | 45 +++++++++++++++++++
>   2 files changed, 45 insertions(+), 20 deletions(-)
>   delete mode 100644 Documentation/devicetree/bindings/media/meson-ir.txt
>   create mode 100644 Documentation/devicetree/bindings/media/meson-ir.yaml

I've already posted a patch for ir which is reviewed and ready to be merged :
https://lore.kernel.org/all/20221117-b4-amlogic-bindings-convert-v3-4-e28dd31e3bed@linaro.org/

The only remaining bindings that remains to convert/document are:
  ['amlogic,axg-audio-clkc']
  ['amlogic,g12a-audio-clkc']
  ['amlogic,sm1-audio-clkc']
  ['amlogic,g12a-tohdmitx']
  ['amlogic,sm1-tohdmitx', 'amlogic,g12a-tohdmitx']
  ['everest,es7154']
  ['everest,es7241']
  ['ti,tas5707']
  ['linux,spdif-dir']
  ['gpio-fan']
  ['pwm-fan']

Neil

> 
> diff --git a/Documentation/devicetree/bindings/media/meson-ir.txt b/Documentation/devicetree/bindings/media/meson-ir.txt
> deleted file mode 100644
> index efd9d29a8..000000000
> --- a/Documentation/devicetree/bindings/media/meson-ir.txt
> +++ /dev/null
> @@ -1,20 +0,0 @@
> -* Amlogic Meson IR remote control receiver
> -
> -Required properties:
> - - compatible	: depending on the platform this should be one of:
> -		  - "amlogic,meson6-ir"
> -		  - "amlogic,meson8b-ir"
> -		  - "amlogic,meson-gxbb-ir"
> - - reg		: physical base address and length of the device registers
> - - interrupts	: a single specifier for the interrupt from the device
> -
> -Optional properties:
> - - linux,rc-map-name:	see rc.txt file in the same directory.
> -
> -Example:
> -
> -	ir-receiver@c8100480 {
> -		compatible= "amlogic,meson6-ir";
> -		reg = <0xc8100480 0x20>;
> -		interrupts = <0 15 1>;
> -	};
> diff --git a/Documentation/devicetree/bindings/media/meson-ir.yaml b/Documentation/devicetree/bindings/media/meson-ir.yaml
> new file mode 100644
> index 000000000..8d3c7acfa
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/meson-ir.yaml
> @@ -0,0 +1,45 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/media/meson-ir.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Amlogic Meson IR remote control receiver
> +
> +maintainers:
> +  - Heiner Kallweit <hkallweit1@gmail.com>
> +
> +allOf:
> +  - $ref: rc.yaml#
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - enum:
> +          - amlogic,meson6-ir
> +          - amlogic,meson8b-ir
> +          - amlogic,meson-gxbb-ir
> +      - items:
> +          - const: amlogic,meson-gx-ir
> +          - const: amlogic,meson-gxbb-ir
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    ir-receiver@c8100480 {
> +      compatible= "amlogic,meson6-ir";
> +      reg = <0xc8100480 0x20>;
> +      interrupts = <0 15 1>;
> +    };
  
Krzysztof Kozlowski Feb. 16, 2023, 10:12 a.m. UTC | #2
On 13/02/2023 10:02, Neil Armstrong wrote:
> Hi Heiner,
> 
> On 12/02/2023 17:51, Heiner Kallweit wrote:
>> Convert Amlogic Meson IR controller binding to yaml.
>>
>> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
>> ---
>>   .../devicetree/bindings/media/meson-ir.txt    | 20 ---------
>>   .../devicetree/bindings/media/meson-ir.yaml   | 45 +++++++++++++++++++
>>   2 files changed, 45 insertions(+), 20 deletions(-)
>>   delete mode 100644 Documentation/devicetree/bindings/media/meson-ir.txt
>>   create mode 100644 Documentation/devicetree/bindings/media/meson-ir.yaml
> 
> I've already posted a patch for ir which is reviewed and ready to be merged :
> https://lore.kernel.org/all/20221117-b4-amlogic-bindings-convert-v3-4-e28dd31e3bed@linaro.org/

lore has useful keyword "dfn". Just put there "dfn:meson-ir.txt" before
converting bindings and it can spare you some effort.

Best regards,
Krzysztof
  

Patch

diff --git a/Documentation/devicetree/bindings/media/meson-ir.txt b/Documentation/devicetree/bindings/media/meson-ir.txt
deleted file mode 100644
index efd9d29a8..000000000
--- a/Documentation/devicetree/bindings/media/meson-ir.txt
+++ /dev/null
@@ -1,20 +0,0 @@ 
-* Amlogic Meson IR remote control receiver
-
-Required properties:
- - compatible	: depending on the platform this should be one of:
-		  - "amlogic,meson6-ir"
-		  - "amlogic,meson8b-ir"
-		  - "amlogic,meson-gxbb-ir"
- - reg		: physical base address and length of the device registers
- - interrupts	: a single specifier for the interrupt from the device
-
-Optional properties:
- - linux,rc-map-name:	see rc.txt file in the same directory.
-
-Example:
-
-	ir-receiver@c8100480 {
-		compatible= "amlogic,meson6-ir";
-		reg = <0xc8100480 0x20>;
-		interrupts = <0 15 1>;
-	};
diff --git a/Documentation/devicetree/bindings/media/meson-ir.yaml b/Documentation/devicetree/bindings/media/meson-ir.yaml
new file mode 100644
index 000000000..8d3c7acfa
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/meson-ir.yaml
@@ -0,0 +1,45 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/meson-ir.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Amlogic Meson IR remote control receiver
+
+maintainers:
+  - Heiner Kallweit <hkallweit1@gmail.com>
+
+allOf:
+  - $ref: rc.yaml#
+
+properties:
+  compatible:
+    oneOf:
+      - enum:
+          - amlogic,meson6-ir
+          - amlogic,meson8b-ir
+          - amlogic,meson-gxbb-ir
+      - items:
+          - const: amlogic,meson-gx-ir
+          - const: amlogic,meson-gxbb-ir
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    ir-receiver@c8100480 {
+      compatible= "amlogic,meson6-ir";
+      reg = <0xc8100480 0x20>;
+      interrupts = <0 15 1>;
+    };