public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: "Krzysztof Kozlowski" <krzysztof.kozlowski@linaro.org>,
	"Carsten Spieß" <mail@carsten-spiess.de>,
	"Jean Delvare" <jdelvare@suse.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Magnus Damm" <magnus.damm@gmail.com>
Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH 2/2] dt-bindings: hwmon: add renesas,isl28022
Date: Wed, 26 Jul 2023 11:19:12 -0700	[thread overview]
Message-ID: <4105d77e-e011-8df7-35bf-bbfca0b640da@roeck-us.net> (raw)
In-Reply-To: <82628237-e087-269e-9673-cf3873fe4b35@linaro.org>

On 7/26/23 09:14, Krzysztof Kozlowski wrote:
> On 26/07/2023 17:22, Carsten Spieß wrote:
>> Add dt-bindings for Renesase ISL28022 power monitor.
>>
>> Signed-off-by: Carsten Spieß <mail@carsten-spiess.de>
>> ---
> 
> Thank you for your patch. There is something to discuss/improve.
> 
> 
>>   .../bindings/hwmon/renesas,isl28022.yaml      | 67 +++++++++++++++++++
>>   MAINTAINERS                                   |  1 +
>>   2 files changed, 68 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/hwmon/renesas,isl28022.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/hwmon/renesas,isl28022.yaml b/Documentation/devicetree/bindings/hwmon/renesas,isl28022.yaml
>> new file mode 100644
>> index 000000000000..5ecf892db269
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/hwmon/renesas,isl28022.yaml
>> @@ -0,0 +1,67 @@
>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +
> 
> No blank line.
> 
>> +$id: http://devicetree.org/schemas/hwmon/renesas,isl28022.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Renesas ISL28022 power monitor
>> +
>> +maintainers:
>> +  - Carsten Spieß <mail@carsten-spiess.de>
>> +
>> +description: |
>> +  The ISL28022 is a power monitor with I2C interface. The device monitors
>> +  voltage, current via shunt resistor and calculated power.
>> +
>> +  Datasheets:
>> +    https://www.renesas.com/us/en/www/doc/datasheet/isl28022.pdf
>> +
>> +Required properties:
>> +  compatible:
>> +    enum:
>> +      - renesas,isl28022
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +Optional properties:
> 
> It does not look like you tested the bindings, at least after quick
> look. Please run `make dt_binding_check` (see
> Documentation/devicetree/bindings/writing-schema.rst for instructions).
> Maybe you need to update your dtschema and yamllint.
> 
> These are "properties"
> 
>> +  shunt-resistor-micro-ohms:
>> +    description:
>> +      Shunt resistor value in micro-Ohm
>> +      defaults to <0> when not set
>> +      monitoring of current and power not supported when <0>
>> +
>> +  shunt-gain:
> 
> 1. Missing vendor prefix (does not look like generic property)
> 2. -microvolt
> 
>> +    description:
>> +      Shunt gain to scale maximal shunt voltage to
>> +      40mV, 80mV, 160mV, 320mV
>> +      defaults to <8> (320mV) when not set
> 
> And then enum is for 40, 80, 160 and 320.
> 
>> +    enum: [1, 2, 4, 8]
>> +
>> +  average:
>> +    description: |
>> +      Number of samples to be used to report voltage, current and power values.
>> +      defaults to <0> when not set
>> +    enum: [0, 1, 2, 4, 8, 16, 32, 64, 128]
> 
> I am sure hwmon has some property for this. Are you sure it is called
> "average"?
> 

Something with samples. adi,power-sample-average is similar. Others
use average-samples, qcom,avg-samples, touchscreen-average-samples.

Guenter

>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +
>> +additionalProperties: false
>> +
> 
> 
> Best regards,
> Krzysztof
> 


  parent reply	other threads:[~2023-07-26 18:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230726152235.249569-1-mail@carsten-spiess.de>
2023-07-26 15:22 ` [PATCH 2/2] dt-bindings: hwmon: add renesas,isl28022 Carsten Spieß
2023-07-26 16:14   ` Krzysztof Kozlowski
2023-07-26 16:19     ` Krzysztof Kozlowski
2023-07-26 18:19     ` Guenter Roeck [this message]
2023-07-26 18:27       ` Krzysztof Kozlowski
2023-07-26 18:59         ` Guenter Roeck
2023-07-26 19:05           ` Krzysztof Kozlowski
2023-07-26 16:16   ` Guenter Roeck
2023-07-27  7:35     ` Carsten Spieß
2023-07-27  8:07       ` Conor Dooley
2023-07-27  8:25       ` Krzysztof Kozlowski
2023-07-27  9:30         ` Carsten Spieß
2023-07-27 13:55       ` Guenter Roeck
2023-07-26 17:13   ` Rob Herring
     [not found] <20230727194813.2245116-1-mail@carsten-spiess.de>
2023-07-27 19:48 ` Carsten Spieß

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=4105d77e-e011-8df7-35bf-bbfca0b640da@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=jdelvare@suse.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=mail@carsten-spiess.de \
    --cc=robh+dt@kernel.org \
    /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