[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5cb6d599-fa9b-a003-6fd6-c07966e283db@axentia.se>
Date: Fri, 26 Jan 2024 23:16:40 +0100
From: Peter Rosin <peda@...ntia.se>
To: Conor Dooley <conor@...nel.org>,
Naresh Solanki <naresh.solanki@...ements.com>
Cc: Jonathan Cameron <jic23@...nel.org>, Lars-Peter Clausen
<lars@...afoo.de>, Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>, mazziesaccount@...il.com,
linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dt-bindings: iio: afe: voltage-divider: Add
io-channel-cells
Hi!
2024-01-26 at 17:16, Conor Dooley wrote:
> Hey,
>
> On Fri, Jan 26, 2024 at 05:25:08PM +0530, Naresh Solanki wrote:
>> Add #io-channel-cells expected by driver. i.e., below is the message
>> seen in kernel log:
>> OF: /iio-hwmon: could not get #io-channel-cells for /voltage_divider1
>>
>
>> TEST=Run below command & make sure there is no error:
>> make DT_CHECKER_FLAGS=-m dt_binding_check -j1
>
> This shouldn't be in the commit message.
>
>>
>> Signed-off-by: Naresh Solanki <naresh.solanki@...ements.com>
>> ---
>> Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml b/Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml
>> index dddf97b50549..b4b5489ad98e 100644
>> --- a/Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml
>> +++ b/Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml
>> @@ -39,6 +39,9 @@ properties:
>> description: |
>> Channel node of a voltage io-channel.
>>
>> + '#io-channel-cells':
>> + const: 1
>
> The example in this binding looks like the voltage-divider is intended
> to be an "IIO consumer" but "#io-channels-cells" is an "IIO provider"
> property.
>
> Are you sure this is correct?
A voltage-divider is always an iio consumer. And like all iio things,
you may access its output from user space (typically via libiio). At
the same time a voltage-divider is optionally an iio provider for other
in-kernel thingies, in which case you need to specify
#io-channel-cells.
BTW, this is the case for for all bindings handled by the iio-rescale
driver.
Cheers,
Peter
Powered by blists - more mailing lists