Re: [PATCH 2/5] dt-bindings: hwmon: Document adt7475 bypass-attenuator property

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

 



On Mon, Feb 17, 2020 at 5:47 PM Chris Packham
<chris.packham@xxxxxxxxxxxxxxxxxxx> wrote:
>
> From: Logan Shaw <logan.shaw@xxxxxxxxxxxxxxxxxxx>
>
> Add documentation for the bypass-attenuator-in[0-4] property.
>
> Signed-off-by: Logan Shaw <logan.shaw@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Chris Packham <chris.packham@xxxxxxxxxxxxxxxxxxx>
> ---
>  .../devicetree/bindings/hwmon/adt7475.yaml          | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/hwmon/adt7475.yaml b/Documentation/devicetree/bindings/hwmon/adt7475.yaml
> index 2252499ea201..61da90c82649 100644
> --- a/Documentation/devicetree/bindings/hwmon/adt7475.yaml
> +++ b/Documentation/devicetree/bindings/hwmon/adt7475.yaml
> @@ -39,6 +39,17 @@ properties:
>    reg:
>      maxItems: 1
>
> +patternProperties:
> +  "^bypass-attenuator-in[0-4]$":
> +    maxItems: 1
> +    minimum: 0
> +    maximum: 1

The errors here are because you are mixing array and scalar constraints.

You also need a vendor prefix and a type $ref.

> +    description: |
> +      Configures bypassing the individual voltage input attenuator. If
> +      set to 1 the attenuator is bypassed if set to 0 the attenuator is
> +      not bypassed. If the property is absent then the attenuator
> +      retains it's configuration from the bios/bootloader.
> +
>  required:
>    - compatible
>    - reg
> @@ -52,6 +63,8 @@ examples:
>        hwmon@2e {
>          compatible = "adi,adt7476";
>          reg = <0x2e>;
> +        bypass-attenuator-in0 = <1>;
> +        bypass-attenuator-in1 = <0>;
>        };
>      };
>
> --
> 2.25.0
>



[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