Re: [PATCH] dt-bindings: serial: vt8500-uart: convert to json-schema

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 11, 2024 at 05:40:43PM +0530, Kanak Shilledar wrote:
> Convert the VIA VT8500 and WonderMedia WM8xxx UART Controller to
> newer DT schema. Created DT schema based on the .txt file which had
> `compatible`, `reg`, `interrupts` and `clocks` as required properties.
> 
> Additions to the original binding
> - changed the file name from vt8500-uart to via,vt8500-uart.yaml
> - removed unnecessary alias from the example.
> - added Greg and Jiri as maintainers (referred MAINTAINERS file).
> 
> Signed-off-by: Kanak Shilledar <kanakshilledar@xxxxxxxxx>
> ---
>  .../bindings/serial/via,vt8500-uart.yaml      | 52 +++++++++++++++++++
>  .../bindings/serial/vt8500-uart.txt           | 27 ----------
>  2 files changed, 52 insertions(+), 27 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/serial/via,vt8500-uart.yaml
>  delete mode 100644 Documentation/devicetree/bindings/serial/vt8500-uart.txt
> 
> diff --git a/Documentation/devicetree/bindings/serial/via,vt8500-uart.yaml b/Documentation/devicetree/bindings/serial/via,vt8500-uart.yaml
> new file mode 100644
> index 000000000000..b38925ab23a1
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/serial/via,vt8500-uart.yaml
> @@ -0,0 +1,52 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/serial/via,vt8500-uart.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: VIA VT8500 and WonderMedia WM8xxx UART Controller
> +
> +maintainers:
> +  - Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> +  - Jiri Slaby <jirislaby@xxxxxxxxxx>

Don't put subsystem maintainers here. It should be someone with h/w. 
(The VT8500 maintainer if there is one?). If you can't come up with 
anyone, you can put me.

> +  - Kanak Shilledar <kanakshilledar111@xxxxxxxxxxxxxx>
> +
> +allOf:
> +  - $ref: serial.yaml
> +
> +properties:
> +  compatible:
> +    enum:
> +      - via,vt8500-uart
> +      - wm,wm8880-uart
> +
> +    description: |

Don't need '|' if no formatting.

> +      Should be "via,vt8500-uart" (for VIA/WonderMedia chips up to and
> +      including WM8850/WM8950), or "wm,wm8880-uart" (for WM8880 and later)

Just add a comment after the compatible strings (e.g. "# up 
to WM8850/WM8950") and drop this.

> +
> +  clocks:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  reg:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - clocks
> +  - interrupts
> +  - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    serial@d8200000 {
> +        compatible = "via,vt8500-uart";
> +        reg = <0xd8200000 0x1040>;
> +        interrupts = <32>;
> +        clocks = <&clkuart0>;
> +    };
> diff --git a/Documentation/devicetree/bindings/serial/vt8500-uart.txt b/Documentation/devicetree/bindings/serial/vt8500-uart.txt
> deleted file mode 100644
> index 2b64e6107fb3..000000000000
> --- a/Documentation/devicetree/bindings/serial/vt8500-uart.txt
> +++ /dev/null
> @@ -1,27 +0,0 @@
> -* VIA VT8500 and WonderMedia WM8xxx UART Controller
> -
> -Required properties:
> -- compatible: should be "via,vt8500-uart" (for VIA/WonderMedia chips up to and
> -	including WM8850/WM8950), or "wm,wm8880-uart" (for WM8880 and later)
> -
> -- reg: base physical address of the controller and length of memory mapped
> -	region.
> -
> -- interrupts: hardware interrupt number
> -
> -- clocks: shall be the input parent clock phandle for the clock. This should
> -	be the 24Mhz reference clock.
> -
> -Aliases may be defined to ensure the correct ordering of the uarts.
> -
> -Example:
> -	aliases {
> -		serial0 = &uart0;
> -	};
> -
> -	uart0: serial@d8200000 {
> -		compatible = "via,vt8500-uart";
> -		reg = <0xd8200000 0x1040>;
> -		interrupts = <32>;
> -		clocks = <&clkuart0>;
> -	};
> -- 
> 2.45.2
> 




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux