Re: [PATCH v2 1/2] dt-bindings: iio: dac: Add max22007
From: Janani Sunil
Date: Fri Jan 09 2026 - 09:08:17 EST
Hi Marcelo,
Thank you for the suggestion.
However, reusing the output-range-microamp and output-range-microvolt properties might mislead the users into thinking that they can configure the DAC output range, which the device does not support. The adi,ch-func fits better here.
On 1/9/26 13:44, Marcelo Schmitt wrote:
Hi Janani,
One extra comment in addition to Krzysztof's.
On 01/08, Janani Sunil wrote:
Devicetree bindings for MAX22007 4-channel 12-bit DAC that drives a
voltage or current output on each channel
Signed-off-by: Janani Sunil <janani.sunil@xxxxxxxxxx>
---
...
+
+patternProperties:
+ "^channel@[0-3]$":
+ $ref: /schemas/iio/dac/dac.yaml#
+ type: object
+ description:
+ Represents the external channels which are connected to the DAC.
+
+ properties:
+ reg:
+ description: Channel number
+ items:
+ minimum: 0
+ maximum: 3
+
+ adi,ch-func:
+ description:
+ Channel output type. Use CH_FUNC_VOLTAGE_OUTPUT for voltage
+ output or CH_FUNC_CURRENT_OUTPUT for current output.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [1, 2]
adi,ad74413r.yaml has many possibilities for the channel output type.
max22007 is only either voltage or current.
Can't we do this with output-range-microamp and output-range-microvolt from dac.yaml?
Figure out the channel type from the output-range- property?
+
+ required:
+ - reg
+ - adi,ch-func
+
+ unevaluatedProperties: false
With best regards,
Marcelo
Best Regards,
Janani Sunil