Document devicetree bindings for the iio-hwmon driver. Also add documentation for the channel-types option. Signed-off-by: Liam Beguin <liambeguin@xxxxxxxxx> --- .../devicetree/bindings/hwmon/iio-hwmon.yaml | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/iio-hwmon.yaml diff --git a/Documentation/devicetree/bindings/hwmon/iio-hwmon.yaml b/Documentation/devicetree/bindings/hwmon/iio-hwmon.yaml new file mode 100644 index 000000000000..fb8b437112a5 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/iio-hwmon.yaml @@ -0,0 +1,41 @@ +# SPDX-License-Identifier: GPL-2.0-only +%YAML 1.2 +--- + +$id: http://devicetree.org/schemas/hwmon/iio-hwmon.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: bindings for the IIO hwmon bridge + +maintainers: + - Jean Delvare <jdelvare@xxxxxxxx> + - Guenter Roeck <linux@xxxxxxxxxxxx> + +properties: + compatible: + enum: + - iio-hwmon + + io-channels: + $ref: /schemas/types.yaml#/definitions/phandle-array + + io-channel-names: + $ref: /schemas/types.yaml#/definitions/string-array + + channel-types: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: | + an array of channel types used to override the IIO type of each channel. + +additionalProperties: false + +examples: + - | + #define IIO_VOLTAGE 0 + #define IIO_CURRENT 1 + iio_hwmon_adc0 { + compatible = "iio-hwmon"; + io-channels = <&adc 0>, <&adc 1>; + io-channel-names = "input_current", "input_voltage" ; + channel-types = <IIO_CURRENT>, <IIO_VOLTAGE>; + }; -- 2.30.1.489.g328c10930387