Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Slawomir Stepien <sst@poczta.fm>,
	linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org
Cc: jdelvare@suse.com, linux@roeck-us.net, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, przemyslaw.cencner@nokia.com,
	krzysztof.adamski@nokia.com, alexander.sverdlin@nokia.com,
	Slawomir Stepien <slawomir.stepien@nokia.com>
Subject: Re: [PATCH 3/8] dt-bindings: hwmon: Allow specifying channels for lm90
Date: Fri, 20 May 2022 12:13:04 +0200	[thread overview]
Message-ID: <3ea92486-0cf9-ce3d-d1b6-7a76f1d5a129@linaro.org> (raw)
In-Reply-To: <20220520093243.2523749-4-sst@poczta.fm>

On 20/05/2022 11:32, Slawomir Stepien wrote:
> From: Slawomir Stepien <slawomir.stepien@nokia.com>
> 
> Add binding description for temperature channels. Currently, support for
> label and offset is implemented.
> 
> Signed-off-by: Slawomir Stepien <slawomir.stepien@nokia.com>
> ---
>  .../bindings/hwmon/national,lm90.yaml         | 39 +++++++++++++++++++
>  1 file changed, 39 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/national,lm90.yaml b/Documentation/devicetree/bindings/hwmon/national,lm90.yaml
> index 066c02541fcf..9a5aa78d4db1 100644
> --- a/Documentation/devicetree/bindings/hwmon/national,lm90.yaml
> +++ b/Documentation/devicetree/bindings/hwmon/national,lm90.yaml
> @@ -62,6 +62,37 @@ required:
>  
>  additionalProperties: false
>  
> +patternProperties:

Which models use this?

> +  "^channel@([0-2])$":
> +    type: object
> +    description: |

No need for |

> +      Represents channels of the device and their specific configuration.
> +
> +    properties:
> +      reg:
> +        description: |

The same.

> +          The channel number. 0 is local channel, 1-2 are remote channels.
> +        items:
> +          minimum: 0
> +          maximum: 2
> +
> +      label:
> +        description: |

The same.

> +          A descriptive name for this channel, like "ambient" or "psu".
> +
> +      offset:
> +        description: |

This does not look like standard property, so you need vendor and unit
suffix.

> +          The value (millidegree Celsius) to be programmed in the channel specific offset register
> +          (if supported by device).

You described programming model which should not be put in the bindings.
Please describe the hardware.

> +          For remote channels only.
> +        $ref: /schemas/types.yaml#/definitions/int32
> +        default: 0
> +
> +    required:
> +      - reg
> +
> +    additionalProperties: false
> +
>  examples:
>    - |
>      #include <dt-bindings/interrupt-controller/irq.h>
> @@ -76,5 +107,13 @@ examples:
>              vcc-supply = <&palmas_ldo6_reg>;
>              interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
>              #thermal-sensor-cells = <1>;
> +            #address-cells = <1>;
> +            #size-cells = <0>;
I assume you tested the bindings with dt_bindings_check?

I have some doubts, as this should fail.

> +
> +            channel@0 {
> +                reg = <0x0>;
> +                label = "internal";
> +                offset = <1000>;
> +            };
>          };
>      };


Best regards,
Krzysztof

  reply	other threads:[~2022-05-20 10:13 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-20  9:32 [PATCH 0/8] Add support for ADT7481 in lm90 Slawomir Stepien
2022-05-20  9:32 ` [PATCH 1/8] dt-bindings: hwmon: " Slawomir Stepien
2022-05-20 10:08   ` Krzysztof Kozlowski
2022-05-20  9:32 ` [PATCH 2/8] dt-bindings: hwmon: Add 'extended-range-enable' property support " Slawomir Stepien
2022-05-20 10:09   ` Krzysztof Kozlowski
2022-05-20 10:57     ` Slawomir Stepien
2022-05-20  9:32 ` [PATCH 3/8] dt-bindings: hwmon: Allow specifying channels for lm90 Slawomir Stepien
2022-05-20 10:13   ` Krzysztof Kozlowski [this message]
2022-05-20 12:38     ` Slawomir Stepien
2022-05-20 12:47       ` Krzysztof Kozlowski
2022-05-20 13:23         ` Slawomir Stepien
2022-05-20 13:34           ` Krzysztof Kozlowski
2022-05-20 14:02       ` Guenter Roeck
2022-05-20 13:42     ` Guenter Roeck
2022-05-20 14:09       ` Krzysztof Kozlowski
2022-05-20 14:22         ` Guenter Roeck
2022-05-24 11:53           ` Slawomir Stepien
2022-05-24 12:17             ` Slawomir Stepien
2022-05-24 17:27               ` Slawomir Stepien
2022-05-24 17:59                 ` Krzysztof Kozlowski
2022-05-25  7:07                   ` Slawomir Stepien
2022-05-20  9:32 ` [PATCH 4/8] hwmon: (lm90) add support for ADT7481 Slawomir Stepien
2022-05-20  9:32 ` [PATCH 5/8] hwmon: (lm90) define maximum number of channels that are supported Slawomir Stepien
2022-05-21  2:36   ` Guenter Roeck
2022-05-22 14:59     ` Slawomir Stepien
2022-05-20  9:32 ` [PATCH 6/8] hwmon: (lm90) enable the extended temperature range Slawomir Stepien
2022-05-20  9:32 ` [PATCH 7/8] hwmon: (lm90) read the channel's label from device-tree Slawomir Stepien
2022-05-20 10:15   ` Krzysztof Kozlowski
2022-05-20 11:01     ` Slawomir Stepien
2022-05-20 11:41       ` Krzysztof Kozlowski
2022-05-20  9:32 ` [PATCH 8/8] hwmon: (lm90) read the channel's offset " Slawomir Stepien
2022-05-20 13:45 ` [PATCH 0/8] Add support for ADT7481 in lm90 Guenter Roeck
2022-05-20 16:01   ` Guenter Roeck
2022-05-22 14:52     ` Slawomir Stepien
2022-05-22 15:00       ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3ea92486-0cf9-ce3d-d1b6-7a76f1d5a129@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=alexander.sverdlin@nokia.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jdelvare@suse.com \
    --cc=krzysztof.adamski@nokia.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=przemyslaw.cencner@nokia.com \
    --cc=robh+dt@kernel.org \
    --cc=slawomir.stepien@nokia.com \
    --cc=sst@poczta.fm \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox