Re: [PATCH v2 2/8] dt-bindings: iio: dac: maxim,ds4424: add maxim,rfs-ohms property

Conor Dooley
2026-01-28T17:00:15Z

[-- Attachment #1: Type: text/plain, Size: 3280 bytes --]

On Wed, Jan 28, 2026 at 09:01:18AM +0100, David Jander wrote:
> On Tue, 27 Jan 2026 19:55:26 +0000
> Conor Dooley <conor@kernel.org> wrote:
>
> > On Tue, Jan 27, 2026 at 07:49:20PM +0000, Conor Dooley wrote:
> > > On Tue, Jan 27, 2026 at 07:09:33AM +0100, Oleksij Rempel wrote:
> > > > The Maxim DS4422/DS4424 and DS4402/DS4404 current DACs determine their
> > > > full-scale output current via external resistors (Rfs) connected to the
> > > > FSx pins. Without knowing these values, the full-scale range of the
> > > > hardware is undefined.
> > > >
> > > > Add the 'maxim,rfs-ohms' property to describe these physical components.
> > > > This property is required to provide a complete description of the
> > > > hardware configuration.
> > > >
> > > > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> > > > ---
> > > > changes v2:
> > > > - make maxim,rfs-ohms a required property as the hardware range is undefined
> > > > without external resistors.
> > > > - add allOf constraints to enforce 2 vs 4 items in maxim,rfs-ohms based on
> > > > compatible string.
> > > > - drop explicit $ref for maxim,rfs-ohms to fix dt_binding_check warning.
> > > > - update example in binding to include the new required property.
> > > > ---
> > > > .../bindings/iio/dac/maxim,ds4424.yaml | 36 +++++++++++++++++++
> > > > 1 file changed, 36 insertions(+)
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/iio/dac/maxim,ds4424.yaml b/Documentation/devicetree/bindings/iio/dac/maxim,ds4424.yaml
> > > > index efe63e6cb55d..400afd8771aa 100644
> > > > --- a/Documentation/devicetree/bindings/iio/dac/maxim,ds4424.yaml
> > > > +++ b/Documentation/devicetree/bindings/iio/dac/maxim,ds4424.yaml
> > > > @@ -27,9 +27,44 @@ properties:
> > > >
> > > > vcc-supply: true
> > > >
> > > > + maxim,rfs-ohms:
> > > > + description: |
> > > > + Array of resistance values in Ohms for the external Rfs resistors
> > > > + connected to the FS pins.
> > > > + - For DS44x2 (2 channels): 2 values required.
> > > > + - For DS44x4 (4 channels): 4 values required.
> > > > + Typical values range from 40000 (40 kOhm) to 160000 (160 kOhm).
> > >
> > > Add here
> > > maxItems: 4
> > > minItems: 2
> > >
> > > Are 40kOhm and 160kOhm actual max/min values, or just a suggested range?
> >
> > Datasheet for the ds4424 seems to imply they're actual max/min values:
> > "Input resistors (RFS) must be between the speciifed values to ensure the
> > device meets its accuracy and linearity specifications."
> > In that case, consider also adding something like:
> > items:
> > maximum: 40000
> > minimum: 160000
> >
> > Although, that would complain about the 5100 Ohms you're using. How come
> > the example lies outside of the "typical" range?
>
> Sorry to chime in here out of nowhere with this, but 2 things:

No no, don't apologise - that's good info and makes sense. Thanks.

> 1. Rfs for DS4402/4 has a different "typical" range than DS4424 (different
> Vref and different output current range).
> 2. "Typical" or "recommended" ranges should not translate to a hard limit in
> the driver. IMHO, no max or min value should be enforced here.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]