diff mbox series

[v5,2/5] dt-bindings: hwmon: Document adt7475 bypass-attenuator property

Message ID 20200227084642.7057-3-chris.packham@alliedtelesis.co.nz (mailing list archive)
State Accepted
Headers show
Series hwmon: (adt7475) attenuator bypass and pwm invert | expand

Commit Message

Chris Packham Feb. 27, 2020, 8:46 a.m. UTC
From: Logan Shaw <logan.shaw@alliedtelesis.co.nz>

Add documentation for the bypass-attenuator-in[0-4] property.

Signed-off-by: Logan Shaw <logan.shaw@alliedtelesis.co.nz>
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Rob Herring <robh@kernel.org>
---

Notes:
    Changes in v5:
    - add review from Rob
    
    Changes in v4:
    - use $ref uint32 and enum
    - add 'adi' vendor prefix
    
    Changes in v3:
    - separated addition of new properties from conversion to yaml

 .../devicetree/bindings/hwmon/adt7475.yaml          | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Guenter Roeck March 3, 2020, 9 p.m. UTC | #1
On Thu, Feb 27, 2020 at 09:46:39PM +1300, Chris Packham wrote:
> From: Logan Shaw <logan.shaw@alliedtelesis.co.nz>
> 
> Add documentation for the bypass-attenuator-in[0-4] property.
> 
> Signed-off-by: Logan Shaw <logan.shaw@alliedtelesis.co.nz>
> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
> Reviewed-by: Rob Herring <robh@kernel.org>

Applied.

Thanks,
Guenter

> ---
> 
> Notes:
>     Changes in v5:
>     - add review from Rob
>     
>     Changes in v4:
>     - use $ref uint32 and enum
>     - add 'adi' vendor prefix
>     
>     Changes in v3:
>     - separated addition of new properties from conversion to yaml
> 
>  .../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..e40612ee075f 100644
> --- a/Documentation/devicetree/bindings/hwmon/adt7475.yaml
> +++ b/Documentation/devicetree/bindings/hwmon/adt7475.yaml
> @@ -39,6 +39,17 @@ properties:
>    reg:
>      maxItems: 1
>  
> +patternProperties:
> +  "^adi,bypass-attenuator-in[0-4]$":
> +    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.
> +    allOf:
> +     - $ref: /schemas/types.yaml#/definitions/uint32
> +     - enum: [0, 1]
> +
>  required:
>    - compatible
>    - reg
> @@ -52,6 +63,8 @@ examples:
>        hwmon@2e {
>          compatible = "adi,adt7476";
>          reg = <0x2e>;
> +        adi,bypass-attenuator-in0 = <1>;
> +        adi,bypass-attenuator-in1 = <0>;
>        };
>      };
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/hwmon/adt7475.yaml b/Documentation/devicetree/bindings/hwmon/adt7475.yaml
index 2252499ea201..e40612ee075f 100644
--- a/Documentation/devicetree/bindings/hwmon/adt7475.yaml
+++ b/Documentation/devicetree/bindings/hwmon/adt7475.yaml
@@ -39,6 +39,17 @@  properties:
   reg:
     maxItems: 1
 
+patternProperties:
+  "^adi,bypass-attenuator-in[0-4]$":
+    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.
+    allOf:
+     - $ref: /schemas/types.yaml#/definitions/uint32
+     - enum: [0, 1]
+
 required:
   - compatible
   - reg
@@ -52,6 +63,8 @@  examples:
       hwmon@2e {
         compatible = "adi,adt7476";
         reg = <0x2e>;
+        adi,bypass-attenuator-in0 = <1>;
+        adi,bypass-attenuator-in1 = <0>;
       };
     };