lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250628162910.1256b220@jic23-huawei>
Date: Sat, 28 Jun 2025 16:29:10 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: David Lechner <dlechner@...libre.com>
Cc: Lothar Rubusch <l.rubusch@...il.com>, 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 Fri, 27 Jun 2025 11:27:22 -0500
David Lechner <dlechner@...libre.com> wrote:

> 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.

Agreed. vref-supply should only be used if it's an external pin labeled
vref.  (which is fairly common).  Where it's labeled V_A like here we
should name it after that.  Fix would be as you suggest with the fallback
to cover DT bindings in use.

Jonathan



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ