Re: [PATCH] dt-bindings: i2c: convert to dt schema

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

 



On Wed, Jun 19, 2024 at 09:19:36PM +0530, Kanak Shilledar wrote:

$subject is missing a prefix for the device in question.

> diff --git a/Documentation/devicetree/bindings/i2c/nxp,lpc1788-i2c.yaml b/Documentation/devicetree/bindings/i2c/nxp,lpc1788-i2c.yaml
> new file mode 100644
> index 000000000000..79d6774dd54f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/i2c/nxp,lpc1788-i2c.yaml
> @@ -0,0 +1,66 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/i2c/nxp,lpc1788-i2c.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: NXP I2C controller for LPC2xxx/178x/18xx/43xx
> +
> +maintainers:
> +  - Vladimir Zapolskiy <vz@xxxxxxxxx>
> +
> +allOf:
> +  - $ref: /schemas/i2c/i2c-controller.yaml#
> +
> +properties:
> +  compatible:
> +    const: nxp,lpc1788-i2c
> +
> +  reg:
> +    description: physical address and length of the device registers

Drop all of these descriptions as they're obvious, other than...

> +    maxItems: 1
> +
> +  interrupts:
> +    description: a single interrupt specifier
> +    maxItems: 1
> +
> +  clocks:
> +    description: clock for the device
> +    maxItems: 1
> +
> +  clock-frequency:
> +    description: the desired I2C bus clock frequency in Hz

..maybe this one. Otherwise this looks okay to me.

Thanks,
Conor.

> +    default: 100000
> +
> +  resets:
> +    description: reset for the device
> +    maxItems: 1
> +
> +  '#address-cells':
> +    const: 1
> +
> +  '#size-cells':
> +    const: 0

These two come for free with the ref to i2c-controller.yaml :)

> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clocks
> +  - "#address-cells"
> +  - "#size-cells"
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include "dt-bindings/clock/lpc18xx-ccu.h"
> +
> +    i2c@400a1000 {
> +        compatible = "nxp,lpc1788-i2c";
> +        reg = <0x400a1000 0x1000>;
> +        interrupts = <18>;
> +        clocks = <&ccu1 CLK_APB1_I2C0>;
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +    };
> -- 
> 2.45.2
> 

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux