From: "Carsten Spieß" <mail@carsten-spiess.de>
To: Guenter Roeck <linux@roeck-us.net>,
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: Thu, 27 Jul 2023 09:35:28 +0200 [thread overview]
Message-ID: <20230727093528.594ce3a7.mail@carsten-spiess.de> (raw)
In-Reply-To: <f8fdc8d7-6ac5-5e20-10ef-7417d79c1b91@roeck-us.net>
[-- Attachment #1: Type: text/plain, Size: 3002 bytes --]
thanks all for your input.
I conclude here in one answer:
On 7/26/23 18:14, Krzysztof Kozlowski wrote:
> It does not look like you tested the bindings, at least after quick
> look. Please run `make dt_binding_check` (see
sorry i missed that, fixed for [Patch v2].
On 7/26/23 18:14, Krzysztof Kozlowski wrote:
>> + shunt-gain:
> 1. Missing vendor prefix (does not look like generic property)
> 2. -microvolt
> And then enum is for 40, 80, 160 and 320.
replaced with
renesas,shunt-range-milli-volts:
description: |
maximal shunt voltage range of 40mV, 80mV, 160mV or 320mV
$ref: /schemas/types.yaml#/definitions/uint32-array
default: 320
enum: [40, 80, 160, 320]
On 26/07/2023 18:16, Guenter Roeck wrote:
>> + 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>
> +
> Should not default to 0 (disabled).
When shunt resistor value is not known, current and power calculation can not be done,
but the shunt voltage still can be measured.
As the resistor is externaly connected to the ISL28022 chip there is no default.
When i set default to any value (e.g 1000 micro Ohm), current and power calculation
will give wrong results (except when the shunt _is_ 1000 micro Ohm)
On 26/07/2023 18:16, Guenter Roeck wrote:
>> + 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]
> Should not default to 0 (disabled).
From datasheet table 6 on page 15 there are two similar ADC modes:
3 - without samples
8 - with one? sample
I intended enum 0 to ADC mode 3, 1 to ADC mode 8,
but i can live without ADC mode 3.
On 26/07/2023 20:59, Guenter Roeck wrote:
> On 7/26/23 11:27, Krzysztof Kozlowski wrote:
>> On 26/07/2023 20:19, Guenter Roeck wrote:
>>>>> + average:
>>>>> + 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.
>>
>> So probably it's a time to come with something generic, e.g.:
>> average-samples in some hwmon.yaml
As there's no generic yet, replaced with
renesas,average-samples:
description: |
Number of samples to be used to report voltage, current and power values.
default: 1
$ref: /schemas/types.yaml#/definitions/uint32-array
enum: [1, 2, 4, 8, 16, 32, 64, 128]
On 26/07/2023 19:13, Rob Herring wrote:
> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> on your patch (DT_CHECKER_FLAGS is new in v5.13):
Fixed for [Patch v2], runs without errors or warnings
Regards, Carsten
[-- Attachment #2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-07-27 7:44 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
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ß [this message]
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=20230727093528.594ce3a7.mail@carsten-spiess.de \
--to=mail@carsten-spiess.de \
--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=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=magnus.damm@gmail.com \
--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