devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alisa-Dariana Roman <alisadariana@gmail.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Alisa-Dariana Roman <alisa.roman@analog.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	Alexandru Tachici <alexandru.tachici@analog.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Maksim Kiselev <bigunclemax@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Cosmin Tanislav <demonsingur@gmail.com>,
	Hugo Villeneuve <hvilleneuve@dimonoff.com>,
	Marius Cristea <marius.cristea@microchip.com>,
	Marcus Folkesson <marcus.folkesson@gmail.com>,
	Ibrahim Tilki <Ibrahim.Tilki@analog.com>,
	ChiaEn Wu <chiaen_wu@richtek.com>,
	Ivan Mikhaylov <fr0st61te@gmail.com>,
	Niklas Schnelle <schnelle@linux.ibm.com>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] dt-bindings: iio: adc: ad7192: Add AD7194 support
Date: Tue, 14 Nov 2023 20:27:41 +0200	[thread overview]
Message-ID: <80ad972c-9f98-4c57-8318-c84225e79cbe@gmail.com> (raw)
In-Reply-To: <124c97ca-0c2c-4b92-8d8e-99d589daf2da@linaro.org>

On 14.11.2023 19:39, Krzysztof Kozlowski wrote:
> On 14/11/2023 17:02, Alisa-Dariana Roman wrote:
>> On 06.11.2023 10:56, Krzysztof Kozlowski wrote:
>>> On 05/11/2023 20:31, alisadariana@gmail.com wrote:
>>>> From: Alisa-Dariana Roman <alisa.roman@analog.com>
>>>>
>>>> Unlike the other AD719Xs, AD7194 has configurable differential
>>>> channels. The default configuration for these channels can be changed
>>>> from the devicetree.
>>>>
>>>> Also add an example for AD7194 devicetree.
>>>>
>>>> Signed-off-by: Alisa-Dariana Roman <alisa.roman@analog.com>
>>>> ---
>>>>    .../bindings/iio/adc/adi,ad7192.yaml          | 69 +++++++++++++++++++
>>>>    1 file changed, 69 insertions(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
>>>> index 16def2985ab4..b9a9f7b20670 100644
>>>> --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
>>>> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
>>>> @@ -21,8 +21,15 @@ properties:
>>>>          - adi,ad7190
>>>>          - adi,ad7192
>>>>          - adi,ad7193
>>>> +      - adi,ad7194
>>>>          - adi,ad7195
>>>>    
>>>> +  '#address-cells':
>>>> +    const: 1
>>>> +
>>>> +  '#size-cells':
>>>> +    const: 0
>>>> +
>>>>      reg:
>>>>        maxItems: 1
>>>>    
>>>> @@ -96,6 +103,31 @@ required:
>>>>      - spi-cpol
>>>>      - spi-cpha
>>>>    
>>>> +patternProperties:
>>>> +  "^channel@([0-9a-f])$":
>>>> +    type: object
>>>> +    $ref: adc.yaml
>>>> +    unevaluatedProperties: false
>>>> +
>>>> +    properties:
>>>> +      reg:
>>>> +        description: The channel index.
>>>> +        minimum: 0
>>>> +        maximum: 7
>>>
>>> Your pattern a bit above is not correct then: [0-7]
>>>
>>>> +
>>>> +      diff-channels:
>>>> +        description: |
>>>> +          The differential channel pair for Ad7194 configurable channels. The
>>>> +          first channel is the positive input, the second channel is the
>>>> +          negative input.
>>>> +        items:
>>>> +          minimum: 1
>>>> +          maximum: 16
>>>> +
>>>> +    required:
>>>> +      - reg
>>>> +      - diff-channels
>>>> +
>>>>    allOf:
>>>>      - $ref: /schemas/spi/spi-peripheral-props.yaml#
>>>>    
>>>> @@ -127,3 +159,40 @@ examples:
>>>>                adi,burnout-currents-enable;
>>>>            };
>>>>        };
>>>> +  - |
>>>> +    spi {
>>>> +        #address-cells = <1>;
>>>> +        #size-cells = <0>;
>>>> +
>>>> +        adc@0 {
>>>> +            #address-cells = <1>;
>>>> +            #size-cells = <0>;
>>>> +            compatible = "adi,ad7194";
>>>> +            reg = <0>;
>>>> +            spi-max-frequency = <1000000>;
>>>> +            spi-cpol;
>>>> +            spi-cpha;
>>>> +            clocks = <&ad7192_mclk>;
>>>> +            clock-names = "mclk";
>>>> +            interrupts = <25 0x2>;
>>>> +            interrupt-parent = <&gpio>;
>>>> +            dvdd-supply = <&dvdd>;
>>>> +            avdd-supply = <&avdd>;
>>>> +            vref-supply = <&vref>;
>>>> +
>>>> +            adi,refin2-pins-enable;
>>>> +            adi,rejection-60-Hz-enable;
>>>> +            adi,buffer-enable;
>>>> +            adi,burnout-currents-enable;
>>>> +
>>>> +            channel@0 {
>>>
>>> Why cannot you add this to the existing example?
>>>
>>>
>>>
>>> Best regards,
>>> Krzysztof
>>>
>> I added another example to highlight the fact that only AD7194 supports
>> configurable channels. How should I proceed?
> 
> Bindings did not tell that, so it seems you miss that part - allOf
> constraining channels per variant.
> 
> Best regards,
> Krzysztof
> 
And should I remove the AD7194 example?

Kind regards,
Alisa-Dariana Roman


  reply	other threads:[~2023-11-14 18:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-05 19:31 [PATCH 0/3] iio: adc: ad7192: Add support for AD7194 alisadariana
2023-11-05 19:31 ` [PATCH 1/3] iio: adc: ad7192: Use device api alisadariana
2023-11-06  9:24   ` Krzysztof Kozlowski
2023-11-14 15:43     ` Alisa-Dariana Roman
2023-11-06 10:22   ` Andy Shevchenko
2023-11-05 19:31 ` [PATCH 2/3] dt-bindings: iio: adc: ad7192: Add AD7194 support alisadariana
2023-11-06  8:56   ` Krzysztof Kozlowski
2023-11-14 16:02     ` Alisa-Dariana Roman
2023-11-14 17:39       ` Krzysztof Kozlowski
2023-11-14 18:27         ` Alisa-Dariana Roman [this message]
2023-11-14 20:32           ` Krzysztof Kozlowski
2023-11-05 19:31 ` [PATCH 3/3] " alisadariana
2023-11-06 10:27   ` Andy Shevchenko
2023-11-06 11:07     ` Jonathan Cameron

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=80ad972c-9f98-4c57-8318-c84225e79cbe@gmail.com \
    --to=alisadariana@gmail.com \
    --cc=Ibrahim.Tilki@analog.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=alexandru.tachici@analog.com \
    --cc=alisa.roman@analog.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=bigunclemax@gmail.com \
    --cc=chiaen_wu@richtek.com \
    --cc=conor+dt@kernel.org \
    --cc=demonsingur@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=fr0st61te@gmail.com \
    --cc=hvilleneuve@dimonoff.com \
    --cc=jic23@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcus.folkesson@gmail.com \
    --cc=marius.cristea@microchip.com \
    --cc=robh+dt@kernel.org \
    --cc=schnelle@linux.ibm.com \
    /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;
as well as URLs for NNTP newsgroup(s).