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: <aKS74OjRSCYhq8Es@debian-BULLSEYE-live-builder-AMD64>
Date: Tue, 19 Aug 2025 15:01:04 -0300
From: Marcelo Schmitt <marcelo.schmitt1@...il.com>
To: Krzysztof Kozlowski <krzk@...nel.org>
Cc: 20250816141220.0dd8d68f@...23-huawei.smtp.subspace.kernel.org,
	Jonathan Cameron <jic23@...nel.org>,
	Jonathan Santos <Jonathan.Santos@...log.com>,
	linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, Michael.Hennerich@...log.com,
	dlechner@...libre.com, nuno.sa@...log.com, andy@...nel.org,
	robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org
Subject: Re: [PATCH 1/4] dt-bindings: iio: adc: ad7768-1: add new supported
 parts

Hi,

On 08/19, Krzysztof Kozlowski wrote:
> On 18/08/2025 23:04, Jonathan Santos wrote:
> > On 08/16, Jonathan Cameron wrote:
> >> On Thu, 14 Aug 2025 08:03:23 +0200
> >> Krzysztof Kozlowski <krzk@...nel.org> wrote:
> >>
> >>> On 14/08/2025 00:39, Jonathan Santos wrote:
> >>>>>>  
> >>>>>> +  adi,aaf-gain:
> >>>>>> +    description: |
> >>>>>> +      Specifies the gain of the Analog Anti-Aliasing Filter (AAF) applied to the
> >>>>>> +      ADC input, measured in milli-units. The AAF provides additional signal  
> >>>>>
> >>>>> What is milli unit? Isn't gain in dB, so maybe you want mB? Quite
> >>>>> unpopular to see mB, but we cannot use 1/100 of dB, so I could
> >>>>> understand it.
> >>>>>  
> >>>>
> >>>> Actually, the gain is expressed in V/V, not in dB. I may have phrased it poorly, but since
> >>>> there are fractional values like 0.364 and 0.143, I chose to represent it
> >>>> in milli-units.  
> >>>
> >>> Why your reply to is corrupted:
> >>> "c3cf9b97-3883-4ebb-a2ed-0033adebda87@...nel.org"?
> >>>
> >>>
> >>> What sort of unit is milli-unit? Isn't this 1/1000 of some BASE unit,
> >>> but you do not have here a base?
> >>>
> >>> I think you want just basis point if this is V/V (already in common
> >>> property suffixes)
> >> Nice. I didn't know about -bp.   That does sound like a good choice for ratio
> >> stuff and here would be 100x larger actual values which is fine.
> >>
> > 
> > Yes, it would be, but the here it is 1000x larger than the
> > actual value (1/1000 V/V). I don't see another unit in
> 
> Huh? How? 1000x larger would be = 1... This makes no sense...
> 
> 
> > property-units.yaml for this specifc case. Maybe using -milli suffix
> > like in 'adi,ad4000.yaml' and 'adi,ad7380.yaml'?
> 
After having a look at the data sheets for these parts (AD7768-1, ADAQ7767-1,
ADAQ7768-1, ADAQ7769-1), I think this indeed has similar semantics to
adi,gain-milli. The data sheet says the AAF selection has an impact on the -3dB
cutoff frequency but, for a given ODR, there is no difference between the
reported −3 dB Bandwidth (kHz) in Table 12, Table 32, and Table 35 from
AD7768-1, ADAQ7767-1, and ADAQ7769-1, respectively. So, looks like this is just 
about signal amplification/attenuation and so the use of adi,gain-milli sounds
appropriate to me.

Considering the AAF doesn't really impact the -3dB cutoff frequency, maybe the
property could be documented like:

  adi,gain-milli:
    description: |
	  Specifies the gain applied by the Analog Anti-Aliasing Filter (AAF) to the
	  ADC input (in milli units). The hardware gain is determined by which input
      pin(s) the signal goes through into the AAF. The possible connections are:
      * For the ADAQ7767-1: input signal connected to IN1±, IN2± or IN3±.
      * For the ADAQ7769-1: OUT_PGA pin connected to IN1_AAF+, IN2_AAF+, or
        IN3_AAF+.
      If not present, default to 1000 (no actual gain applied).
    $ref: /schemas/types.yaml#/definitions/uint16
    enum: [143, 364, 1000]
    default: 1000

Would something along those lines make sense for these devices?

Best regards,
Marcelo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ