Commit 65fb06f0 authored by Jonathan Cameron's avatar Jonathan Cameron
Browse files

dt-bindings: iio: adc: maxim,max9611 yaml conversions



Straight forward conversion of this binding for this
current sense amplifier and ADC.

Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: default avatarJacopo Mondi <jacopo@jmondi.org>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
parent fde6da59
Loading
Loading
Loading
Loading
+0 −27
Original line number Diff line number Diff line
* Maxim max9611/max9612 current sense amplifier with 12-bits ADC interface

Maxim max9611/max9612 is an high-side current sense amplifier with integrated
12-bits ADC communicating over I2c bus.
The device node for this driver shall be a child of a I2c controller.

Required properties
  - compatible: Should be "maxim,max9611" or "maxim,max9612"
  - reg: The 7-bits long I2c address of the device
  - shunt-resistor-micro-ohms: Value, in micro Ohms, of the current sense shunt
			        resistor

Example:

&i2c4 {
	csa: adc@7c {
		compatible = "maxim,max9611";
		reg = <0x7c>;

		shunt-resistor-micro-ohms = <5000>;
	};
};

This device node describes a current sense amplifier sitting on I2c4 bus
with address 0x7c (read address is 0xf9, write address is 0xf8).
A sense resistor of 0,005 Ohm is installed between RS+ and RS- current-sensing
inputs.
+51 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/maxim,max9611.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Maxim MAX9611 and similar current sense amplifiers with integrated ADCs

maintainers:
  - Jacopo Mondi <jacopo@jmondi.org>

description: |
   These devices combine a high-side current sense amplifier with a 12 bit ADC.
   They have an i2c interface.

properties:
  compatible:
    enum:
      - maxim,max9611
      - maxim,max9612

  reg:
    maxItems: 1

  shunt-resistor-micro-ohms:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      Value in micro Ohms of the shunt resistor connected between the RS+ and
      RS- inputs, across which the current is measured.  Value needed to compute
      the scaling of the measured current.

additionalProperties: false

required:
  - compatible
  - reg
  - shunt-resistor-micro-ohms

examples:
  - |
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        adc@7c {
            compatible = "maxim,max9611";
            reg = <0x7c>;
            shunt-resistor-micro-ohms = <5000>;
        };
    };
...