Commit c7c9b1d1 authored by Jonathan Cameron's avatar Jonathan Cameron
Browse files

dt-bindings:iio:potentiostat:ti,lmp91000: txt to yaml conversion.



There were a few parts of the example that did not conform to the
binding description and would not have worked with the Linux driver
as a result.  Fixed them whilst doing this conversion.

Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Acked-by: default avatarMatt Ranostay <matt.ranostay@konsulko.com>
Cc: Matt Ranostay <matt.ranostay@konsulko.com>
Link: https://lore.kernel.org/r/20201031181242.742301-11-jic23@kernel.org
parent 8c693432
Loading
Loading
Loading
Loading
+0 −33
Original line number Diff line number Diff line
* Texas Instruments LMP91000 series of potentiostats

LMP91000: https://www.ti.com/lit/ds/symlink/lmp91000.pdf
LMP91002: https://www.ti.com/lit/ds/symlink/lmp91002.pdf

Required properties:

  - compatible: should be one of the following:
                 "ti,lmp91000"
                 "ti,lmp91002"
  - reg: the I2C address of the device
  - io-channels: the phandle of the iio provider

  - ti,external-tia-resistor: if the property ti,tia-gain-ohm is not defined this
    needs to be set to signal that an external resistor value is being used.

Optional properties:

  - ti,tia-gain-ohm: ohm value of the internal resistor for the transimpedance
    amplifier. Must be 2750, 3500, 7000, 14000, 35000, 120000, or 350000 ohms.

  - ti,rload-ohm: ohm value of the internal resistor load applied to the gas
    sensor. Must be 10, 33, 50, or 100 (default) ohms.

Example:

lmp91000@48 {
	compatible = "ti,lmp91000";
	reg = <0x48>;
	ti,tia-gain-ohm = <7500>;
	ti,rload = <100>;
	io-channels = <&adc>;
};
+68 −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/potentiostat/ti,lmp91000.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Texas Instruments LMP91000 series of potentiostats with I2C control

maintainers:
  - Matt Ranostay <matt.ranostay@konsulko.com>

description: |
  Typically used as a signal conditioner for chemical sensors.
  LMP91000: https://www.ti.com/lit/ds/symlink/lmp91000.pdf
  LMP91002: https://www.ti.com/lit/ds/symlink/lmp91002.pdf

properties:
  compatible:
    enum:
      - ti,lmp91000
      - ti,lmp91002

  reg:
    maxItems: 1

  io-channels:
    maxItems: 1

  ti,external-tia-resistor:
    $ref: /schemas/types.yaml#/definitions/flag
    description:
      If the property ti,tia-gain-ohm is not defined this needs to be set to
      signal that an external resistor value is being used.

  ti,tia-gain-ohm:
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [2750, 3500, 7000, 14000, 35000, 120000, 350000]
    description:
      Internal resistor for the transimpedance amplifier.

  ti,rload-ohm:
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [10, 33, 50, 100]
    description:
      Internal resistor load applied to the gas sensor.
      Default 100 Ohms.

required:
  - compatible
  - reg
  - io-channels

additionalProperties: false

examples:
  - |
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;
        lmp91000@48 {
            compatible = "ti,lmp91000";
            reg = <0x48>;
            ti,tia-gain-ohm = <7000>;
            ti,rload-ohm = <100>;
            io-channels = <&adc>;
        };
    };
...