Re: [PATCH 1/2] dt-bindings: hwmon: add ltc4296-1 support

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

 



On Fri, Oct 25, 2024 at 02:56:10PM +0300, Antoniu Miclaus wrote:
> Add devicetree bindings for the ltc4296-1 device.
> 
> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@xxxxxxxxxx>
> ---
>  .../bindings/hwmon/adi,ltc4296-1.yaml         | 105 ++++++++++++++++++
>  1 file changed, 105 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/hwmon/adi,ltc4296-1.yaml
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/adi,ltc4296-1.yaml b/Documentation/devicetree/bindings/hwmon/adi,ltc4296-1.yaml
> new file mode 100644
> index 000000000000..be73d59a7d65
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/adi,ltc4296-1.yaml
> @@ -0,0 +1,105 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +

If there is going to be new posting: drop blank line.

> +$id: http://devicetree.org/schemas/hwmon/adi,ltc4296-1.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: LTC4296-1 5-Port SPoE PSE Controller
> +
> +maintainers:
> +  - Antoniu Miclaus <antoniu.miclaus@xxxxxxxxxx>
> +
> +description: |
> +  The LTC4296-1 is an IEEE 802.3cg-compliant, five port, single-pair
> +  power over Ethernet (SPoE), power sourcing equipment (PSE)
> +  controller. SPoE simplifies system design and installation with
> +  standardized power and Ethernet data over a single-pair cable.
> +
> +  Datasheet:
> +    https://www.analog.com/en/products/ltc4296-1.html
> +
> +$ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +properties:
> +  compatible:
> +    const: adi,ltc4296-1
> +
> +  reg:
> +    maxItems: 1
> +
> +  '#address-cells'

If there is going to be new posting: use consistent quotes, either ' or
".

> +    const: 1
> +
> +  '#size-cells':
> +    const: 0
> +
> +  vin-supply: true
> +
> +patternProperties:
> +  "^channel@[0-3]$":
> +    type: object
> +    description:
> +      Represents the current monitoring channels.
> +
> +    properties:
> +      reg:
> +        description:
> +          The channel number. ltc4296-1 can monitor 5 currents.
> +        items:
> +          minimum: 0
> +          maximum: 4

maximum is 3, right?

> +
> +      shunt-resistor-micro-ohms:
> +        description:
> +          The value of curent sense resistor in micro ohms.
> +
> +    required:
> +      - reg
> +
> +    additionalProperties: false
> +
> +required:
> +  - compatible
> +  - reg
> +  - vin-supply
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    spi {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        hwmon@0 {
> +            compatible = "adi,ltc4296-1";
> +            reg = <0x0>;
> +            vin-supply = <&vcc>;

Why no channels here? What's the point of such node if you do not
monitor any channels?

> +        };
> +    };
> +  - |
> +    spi {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        hwmon@0 {
> +            #address-cells = <1>;
> +            #size-cells = <0>;
> +
> +            compatible = "adi,ltc4296-1";
> +            reg = <0x0>;
> +            vin-supply = <&vin>;
> +
> +            channel@0 {
> +                    reg = <0x0>;

Use 4 spaces for example indentation.

Best regards,
Krzysztof





[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