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: <aCDBz7iUG7URn3pB@debian-BULLSEYE-live-builder-AMD64>
Date: Sun, 11 May 2025 12:27:11 -0300
From: Marcelo Schmitt <marcelo.schmitt1@...il.com>
To: Rob Herring <robh@...nel.org>
Cc: Marcelo Schmitt <marcelo.schmitt@...log.com>, linux-iio@...r.kernel.org,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	jic23@...nel.org, lars@...afoo.de, Michael.Hennerich@...log.com,
	dlechner@...libre.com, nuno.sa@...log.com, andy@...nel.org,
	krzk+dt@...nel.org, conor+dt@...nel.org
Subject: Re: [PATCH v2 1/7] dt-bindings: iio: adc: Add AD4170

...
> > +
> > +      adi,reference-select:
> > +        description: |
> > +          Select the reference source to use when converting on the specific
> > +          channel. Valid values are:
> > +          0: Differential reference voltage REFIN+ - REFIN−.
> > +          1: Differential reference voltage REFIN2+ - REFIN2−.
> > +          2: Internal 2.5V referece (REFOUT) relative to AVSS.
> > +          3: Analog supply voltage (AVDD) relative AVSS.
> > +          If this field is left empty, the internal reference is selected.
> > +        $ref: /schemas/types.yaml#/definitions/uint8
> 
> You already defined the type in the $defs, so no need to do it again.

The ADC channel node doesn't include/reference the sensor-node.
Wouldn't adi,reference-select default to uint32 if the type is dropped?

The issue here is that adi,reference-select is a property that is meaningful
both for conventional ADC channels and for channels connecting to external
sensors. Thus, the unfortunate repetition of the property. Another possibility
would to be add another type for the ad4170 channels. Something like

$defs:
  ad4170-channel:
    $ref: /schemas/iio/adc/adc.yaml#

      adi,reference-select:
		....

  sensor-node:
    type: object
    $ref: '#/$defs/ad4170-channel'
	...

patternProperties:
  "^channel@[0-9a-f]$":
    $ref: '#/$defs/ad4170-channel'
	...

  "^weighscale@":
    $ref: '#/$defs/sensor-node'
	...

  "^rtd@":
    $ref: '#/$defs/sensor-node'
	...

would that be a better way of having those?

Thanks,
Marcelo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ