From: Ceclan Dumitru <mitrutzceclan@gmail.com>
To: David Lechner <dlechner@baylibre.com>
Cc: linus.walleij@linaro.org, brgl@bgdev.pl, andy@kernel.org,
linux-gpio@vger.kernel.org,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Jonathan Cameron" <jic23@kernel.org>,
"Rob Herring" <robh+dt@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Michael Walle" <michael@walle.cc>,
"Andy Shevchenko" <andy.shevchenko@gmail.com>,
"Arnd Bergmann" <arnd@arndb.de>,
"ChiaEn Wu" <chiaen_wu@richtek.com>,
"Niklas Schnelle" <schnelle@linux.ibm.com>,
"Leonard Göhrs" <l.goehrs@pengutronix.de>,
"Mike Looijmans" <mike.looijmans@topic.nl>,
"Haibo Chen" <haibo.chen@nxp.com>,
"Hugo Villeneuve" <hvilleneuve@dimonoff.com>,
"Ceclan Dumitru" <dumitru.ceclan@analog.com>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v8 1/2] dt-bindings: adc: add AD7173
Date: Thu, 14 Dec 2023 14:43:09 +0200 [thread overview]
Message-ID: <e4a9dde7-dca6-4862-bfb3-a93b879c9a1f@gmail.com> (raw)
In-Reply-To: <CAMknhBEfisaSbHhnnei=gT1HZvHNWHrJD3O2y4b_TikkH=v2Ag@mail.gmail.com>
On 12/12/23 17:09, David Lechner wrote:
> On Tue, Dec 12, 2023 at 11:45 AM Dumitru Ceclan <mitrutzceclan@gmail.com> wrote:
>>
>> The AD7173 family offer a complete integrated Sigma-Delta ADC solution
>> which can be used in high precision, low noise single channel applications
>> or higher speed multiplexed applications. The Sigma-Delta ADC is intended
>> primarily for measurement of signals close to DC but also delivers
>> outstanding performance with input bandwidths out to ~10kHz.
>
> As stated in [1], we should try to make complete bindings. I think
> more could be done here to make this more complete. Most notably, the
> gpio-controller binding is missing. Also maybe something is needed to
> describe how the SYNC/ERROR pin is wired up since it can be an input
> or an output with different functions?
>
GPIO-controller:
'#gpio-cells':
const: 2
gpio-controller: true
Like this, in properties?
Sync can only be an output, Error is configurable. Are there any
examples for how something like this is described?
...
>> + interrupts:
>> + maxItems: 1
>
> Shouldn't this be 2? The datasheet says there is a "Data Output Ready"
> signal on the DOUT/RDY pin and an "Error Output" on the SYNC/ERROR
> pin. Although I could see how RDY could be considered part of the SPI
> bus. In any case, a description explaining what the interrupt is would
> be useful.
>
I do not see how there could be 2 interrupts. DOUT/RDY is used as an
interrupt when waiting for a conversion to finalize.
Sync and Error are sepparate pins, Sync(if enabled) works only as an
input that resets the modulator and the digital filter.
Error can be configured as input, output or ERROR output (OR between all
internal error sources).
Would this be alright
interrupts:
description: Conversion completion interrupt.
Pin is shared with SPI DOUT.
maxItems: 1
...
>> +
>> +patternProperties:
>> + "^channel@[0-9a-f]$":
>> + type: object
>> + $ref: adc.yaml
>> + unevaluatedProperties: false
>> +
>> + properties:
>> + reg:
>> + minimum: 0
>> + maximum: 15
>> +
>> + diff-channels:
>> + items:
>> + minimum: 0
>> + maximum: 31
>
> Do we need to add overrides to limit the maximums for each compatible string?
>
Just to be sure, in the allOf section?
If yes, is there any other more elegant method to obtain this behavior?
...
>> +
>> + required:
>> + - reg
>> + - diff-channels
>
> Individual analog inputs can be used as single-ended or in pairs as
> differential, right? If so, diff-channels should not be required to
> allow for single-ended use.
>
> And we would need to add something like a single-ended-channel
> property to adc.yaml to allow mapping analog input pins to channels
> similar to how diff-channels works, I think (I don't see anything like
> that there already)?
>
> So maybe something like:
>
> oneOf:
> - required:
> single-ended-channel
> - required:
> diff-channels
>
All channels must specify 2 analog input sources, there is no input
source wired by default to AVSS.
In my opinion, there is no need to specify channels as single-ended
because that would require a property that specifies the input that is
wired to AVSS.
next prev parent reply other threads:[~2023-12-14 12:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-12 10:44 [PATCH v8 1/2] dt-bindings: adc: add AD7173 Dumitru Ceclan
2023-12-12 10:44 ` [PATCH v8 2/2] iio: adc: ad7173: add AD7173 driver Dumitru Ceclan
2023-12-13 14:24 ` Andy Shevchenko
2023-12-14 11:02 ` Ceclan Dumitru
2023-12-14 12:30 ` Jonathan Cameron
2023-12-14 12:57 ` Ceclan Dumitru
2023-12-14 14:47 ` Andy Shevchenko
2023-12-17 13:31 ` Jonathan Cameron
2023-12-12 15:09 ` [PATCH v8 1/2] dt-bindings: adc: add AD7173 David Lechner
2023-12-14 12:43 ` Ceclan Dumitru [this message]
2023-12-14 16:12 ` David Lechner
2023-12-14 17:03 ` Ceclan Dumitru
2023-12-17 13:50 ` Jonathan Cameron
2023-12-18 1:00 ` David Lechner
2023-12-20 12:38 ` 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=e4a9dde7-dca6-4862-bfb3-a93b879c9a1f@gmail.com \
--to=mitrutzceclan@gmail.com \
--cc=andy.shevchenko@gmail.com \
--cc=andy@kernel.org \
--cc=arnd@arndb.de \
--cc=brgl@bgdev.pl \
--cc=chiaen_wu@richtek.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=dumitru.ceclan@analog.com \
--cc=haibo.chen@nxp.com \
--cc=hvilleneuve@dimonoff.com \
--cc=jic23@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=l.goehrs@pengutronix.de \
--cc=lars@metafoo.de \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@walle.cc \
--cc=mike.looijmans@topic.nl \
--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).