[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4d01de83-7b85-4127-960d-0563359a0844@baylibre.com>
Date: Fri, 27 Jun 2025 11:27:22 -0500
From: David Lechner <dlechner@...libre.com>
To: Lothar Rubusch <l.rubusch@...il.com>, Jonathan Cameron <jic23@...nel.org>
Cc: Matti Vaittinen <mazziesaccount@...il.com>, nuno.sa@...log.com,
andy@...nel.org, linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
Sukrut Bellary <sbellary@...libre.com>
Subject: Re: [PATCH v1 1/2] iio: adc: ti-adc128s052: add support for
adc121s021
On 6/26/25 4:33 PM, Lothar Rubusch wrote:
> Hi guys,
>
...
> Perhaps just one little question here to you. You used the regulator
> name "vdd" where others
> before used "vref". At the end, this seems to be pretty free,
> depending on how it is set in the
> DT or how you name it in the DT (in my case it was "5v0", but I wanted
> to keep the convention,
> if so).
>
> So, my question is, is there a naming convention what to take for a,
> say, default
> regulator naming or fixed 5V regulator?
>
I don't think there is a naming convention for supplies other than making
it match the pin name from the datasheet.
If we were to try to come up with some standard naming convention though,
I would not include the voltage value in the name. Rather, the properties
should be named after the function that it does, like vref-supply for an
external reference voltage, vio-supply for I/O pin voltage supply,
power-supply for a whole-chip or main supply, analog-supply and digital-supply
for chips that don't have a whole-chip supply but rather split the
analog and digital circuitry. These are the most common ones that I have
seen on ADCs.
The fact that the TI chips in this driver use "vref-supply" doesn't really
make sense in the DT bindings. V_REF is an internal signal in the ADC.
In other words, it's kind of abusing the binding to specify the reference
voltage without actually saying that the chip also has power supplies.
Chips like adc128s052 should really have va-supply for the power supply
connected to the V_A pin that also serves as the reference voltage and
vd-supply for the supply connected to the V_D pin for the digital I/O
supply. And adc121s021 would only have va-supply because there is no
separate V_D pin for a separate I/O supply.
But there are lot's of ADCs already incorrectly using vref-supply like
this, so not sure if it is worth trying to fix them or not. But if we
wanted to fix it for these TI chips, I would suggest to deprecate the
vref-supply and add the actual supplies to the DT bindings and implement
a fallback in the driver to check for vref-supply if the other supplies
are not given so that we don't break existing dtbs.
Powered by blists - more mailing lists