On Thu, Sep 24, 2026 at 03:14:15PM +0200, Neil Armstrong wrote: > Document the Maxim MAX34417 Four-Channel High Dynamic Range Power > Accumulator used to monitor power consumption of portable systems. > > Signed-off-by: Neil Armstrong > --- > .../bindings/iio/adc/maxim,max34417.yaml | 100 +++++++++++++++++++++ > 1 file changed, 100 insertions(+) > > diff --git a/Documentation/devicetree/bindings/iio/adc/maxim,max34417.yaml b/Documentation/devicetree/bindings/iio/adc/maxim,max34417.yaml > new file mode 100644 > index 000000000000..058af61cc04e > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/adc/maxim,max34417.yaml > @@ -0,0 +1,100 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iio/adc/maxim,max34417.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Maxim MAX34417 Four-Channel High Dynamic Range Power Accumulator > + > +maintainers: > + - Neil Armstrong > + > +description: | > + The MAX34417 is a specialized current and voltage monitor used to determine > + power consumption of portable systems. The device has a very wide dynamic > + range (20,000:1) that allows for the accurate measurement of power in such > + systems. The device is configured and monitored with a standard I2C/SMBus > + serial interface. The unidirectional current sensor offers precision > + high-side operation with a low full-scale sense voltage. > + > + Specifications about the device can be found at: > + https://www.analog.com/media/en/technical-documentation/data-sheets/max34417.pdf > + > +properties: > + compatible: > + const: maxim,max34417 ADI wants people to use their prefix for newly added devices, particularly if their release is after the maxim purchase. > + > + "#address-cells": > + const: 1 > + > + "#size-cells": > + const: 0 > + > + reg: > + maxItems: 1 Atypical ordering, usually reg is before these cells props. > + > + vdd-supply: true > + vio-supply: true > + > +patternProperties: > + "^channel@[0-3]$": > + $ref: adc.yaml > + type: object > + description: > + Represents the internal channels of the sensor. > + > + properties: > + reg: > + items: > + - minimum: 0 > + maximum: 3 > + > + label: true This doesn't do anything, when you have unevalatedProperties: false. If these are the only valid properties, use additionalProperties: false instead. Otherwise, you can just remove this line. > + > + shunt-resistor-micro-ohms: > + description: > + Value in micro Ohms of the shunt resistor connected between the RS+ and RS- inputs. > + minimum: 1000 > + maximum: 100000 > + default: 1000 > + > + required: > + - reg > + > + unevaluatedProperties: false > + > +required: > + - compatible > + - reg Typically in IIO, supplies are made required unless the device can operate without them. Cheers, Conor. > + > +additionalProperties: false > + > +examples: > + - | > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + sensor@10 { > + compatible = "maxim,max34417"; > + reg = <0x10>; > + > + #address-cells = <1>; > + #size-cells = <0>; > + > + channel@0 { > + reg = <0>; > + label = "ch0"; > + shunt-resistor-micro-ohms = <5000>; > + }; > + > + channel@1 { > + reg = <1>; > + label = "ch1"; > + }; > + > + channel@2 { > + reg = <2>; > + }; > + }; > + }; > > -- > 2.34.1 >