Commit 75621ae3 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'iio-for-6.2b' of...

Merge tag 'iio-for-6.2b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next

Jonathan writes:

2nd set of IIO new device support, cleanups etc for 6.2

Includes a few late breaking fixes for old issues.

Contains a large set of conversions from i2c probe() to probe_new()
as part of an attempt to finally get rid of the old style probe().

New devices support
* adi,ad74115
  - New driver for this complex input/output device with 16 bit ADCs,
    14 bit DACs amongst other features.
  - A few tidy ups / removal of unused data patches followed.
* adi,adf4377
  - New driver for this dual output integer-N phased locked loop and VCO
    chip.
* maxim,max30208
  - New driver for this high accuracy digital temperature sensor.
* st,lsm6dsx
  - Support for LSM6DS016IS (chip specific data)
  - Support for ISM330IS (id entry only)

Minor cleanups etc
* adi,adis
  - Fix a deadlock on device instance specific mutex.
  - Tidy up by calling unlocked form of __adis_initial_startup() in all
    cases and dropping the locked version.
* adi,ad4130
  - Reference spi-peripehral-props.yaml in the dt-binding.
* adi,ad74413r
  - Fix a bug brought on by integer promotion of signed value to unsigned type.
  - Add an spi_device_id table to allow module autoloading to work.
  - Add support for reset pin.
* adi,ad7606_par
  - devm_platform_get_and_ioremap_resource() instead of opencoding.
* adi,ad7923
  - Add dt-bindings docs for ad7927 via a fallback to ad7928 and do similar
    for ad7924.
* adi,ltc2983
  - Drop a now unneeded $ref for -nanoamp property as dt-schema no covers this
    unit.
* maxim,max11410
  - Fix mask due to repeated use of VREFN instead of one of them being VREFP.
* qcom,spmi-iadc
  - Add fallback compatibles to dt-binding.
* renesas,rzg2l
  - Document use for RZ/Five SoC.
* st,stm32-adc
  - Improved calibration support with error logging and a debugfs
    interface to read back the result.
* ti,adc128s052
  - Fix an issue with missing data members in the adc128_of_match table that
    meant all device were being handled as adc128s052 ADCs.

* tag 'iio-for-6.2b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (178 commits)
  iio: addac: ad74413r: fix blank line after declaration warning
  iio: addac: ad74115: remove unused ad74115_dac_slew_rate_hz_tbl
  dt-bindings: iio: imu: st_lsm6dsx: add ism330is
  iio: imu: st_lsm6dsx: add support to ISM330IS
  iio: frequency: adf4377: add support for ADF4377
  dt-bindings: iio: frequency: add adf4377 doc
  dt-bindings: iio: adc: ad4130: use spi-peripheral-props.yaml
  dt-bindings: iio: temperature: ltc2983: drop $ref for -nanoamp properties
  dt-bindings: iio: adc: renesas,rzg2l-adc: Document RZ/Five SoC
  iio: adc128s052: add proper .data members in adc128_of_match table
  iio: adc: stm32-adc: add debugfs to read raw calibration result
  iio: adc: stm32-adc: improve calibration error log
  iio: adc: stm32-adc: smart calibration support
  iio: addac: ad74413r: add support for reset-gpio
  dt-bindings: iio: ad74413r: add optional reset-gpios
  iio: addac: ad74413r: add spi_device_id table
  dt-bindings: iio/adc: qcom,spmi-iadc: use double compatibles
  dt-bindings: iio: imu: st_lsm6dsx: add lsm6dso16is
  iio: imu: st_lsm6dsx: add support to LSM6DSO16IS
  iio: addac: add AD74115 driver
  ...
parents 9bde43a0 f84eec02
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -190,7 +190,10 @@ patternProperties:
      - reg
      - diff-channels

additionalProperties: false
allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

examples:
  - |
+17 −9
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ maintainers:

description: |
  Analog Devices AD7904, AD7914, AD7923, AD7924 4 Channel ADCs, and AD7908,
   AD7918, AD7928 8 Channels ADCs.
   AD7918, AD7927, AD7928 8 Channels ADCs.

  Specifications about the part can be found at:
    https://www.analog.com/media/en/technical-documentation/data-sheets/AD7923.pdf
@@ -20,14 +20,22 @@ description: |

properties:
  compatible:
    enum:
    oneOf:
      - enum:
          - adi,ad7904
      - adi,ad7914
      - adi,ad7923
      - adi,ad7924
          - adi,ad7908
          - adi,ad7914
          - adi,ad7918
          - adi,ad7923
          - adi,ad7928
      - const: adi,ad7924
        deprecated: true
      - items:
          - const: adi,ad7924
          - const: adi,ad7923
      - items:
          - const: adi,ad7927
          - const: adi,ad7928

  reg:
    maxItems: 1
+5 −2
Original line number Diff line number Diff line
@@ -18,7 +18,10 @@ description: |

properties:
  compatible:
    const: qcom,spmi-iadc
    items:
      - enum:
          - qcom,pm8941-iadc
      - const: qcom,spmi-iadc

  reg:
    description: IADC base address and length in the SPMI PMIC register map
@@ -50,7 +53,7 @@ examples:
        #address-cells = <1>;
        #size-cells = <0>;
        pmic_iadc: adc@3600 {
            compatible = "qcom,spmi-iadc";
            compatible = "qcom,pm8941-iadc", "qcom,spmi-iadc";
            reg = <0x3600>;
            interrupts = <0x0 0x36 0x0 IRQ_TYPE_EDGE_RISING>;
            qcom,external-resistor-micro-ohms = <10000>;
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ properties:
  compatible:
    items:
      - enum:
          - renesas,r9a07g043-adc   # RZ/G2UL
          - renesas,r9a07g043-adc   # RZ/G2UL and RZ/Five
          - renesas,r9a07g044-adc   # RZ/G2L
          - renesas,r9a07g054-adc   # RZ/V2L
      - const: renesas,rzg2l-adc
+373 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/addac/adi,ad74115.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices AD74115H device

maintainers:
  - Cosmin Tanislav <cosmin.tanislav@analog.com>

description: |
  The AD74115H is a single-channel software configurable input/output
  device for industrial control applications. It contains functionality for
  analog output, analog input, digital output, digital input, resistance
  temperature detector, and thermocouple measurements integrated into a single
  chip solution with an SPI interface. The device features a 16-bit ADC and a
  14-bit DAC.

    https://www.analog.com/en/products/ad74115h.html

properties:
  compatible:
    enum:
      - adi,ad74115h

  reg:
    maxItems: 1

  spi-max-frequency:
    maximum: 24000000

  spi-cpol: true

  reset-gpios: true

  interrupts:
    minItems: 1
    maxItems: 2

  interrupt-names:
    minItems: 1
    maxItems: 2
    items:
      enum:
        - adc_rdy
        - alert

  avdd-supply: true
  avcc-supply: true
  dvcc-supply: true
  dovdd-supply: true
  refin-supply: true

  adi,ch-func:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      Channel function.
      0 - High impedance
      1 - Voltage output
      2 - Current output
      3 - Voltage input
      4 - Current input, externally-powered
      5 - Current input, loop-powered
      6 - Resistance input
      7 - RTD measure
      8 - Digital input logic
      9 - Digital input, loop-powered
      10 - Current output with HART
      11 - Current input, externally-powered, with HART
      12 - Current input, loop-powered, with HART
    minimum: 0
    maximum: 12
    default: 0

  adi,conv2-mux:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      Input node for ADC conversion 2.
      0 - SENSE_EXT1 to AGND_SENSE
      1 - SENSE_EXT2 to AGND_SENSE
      2 - SENSE_EXT2 to SENSE_EXT1
      3 - AGND to AGND
    minimum: 0
    maximum: 3
    default: 0

  adi,conv2-range-microvolt:
    description: Conversion range for ADC conversion 2.
    oneOf:
      - items:
          - enum: [-2500000, 0]
          - const: 2500000
      - items:
          - enum: [-12000000, 0]
          - const: 12000000
      - items:
          - const: -2500000
          - const: 0
      - items:
          - const: -104000
          - const: 104000
      - items:
          - const: 0
          - const: 625000

  adi,sense-agnd-buffer-low-power:
    type: boolean
    description:
      Whether to enable low-power buffered mode for the AGND sense pin.

  adi,lf-buffer-low-power:
    type: boolean
    description:
      Whether to enable low-power buffered mode for the low-side filtered
      sense pin.

  adi,hf-buffer-low-power:
    type: boolean
    description:
      Whether to enable low-power buffered mode for the high-side filtered
      sense pin.

  adi,ext2-buffer-low-power:
    type: boolean
    description: Whether to enable low-power buffered mode for the EXT2 pin.

  adi,ext1-buffer-low-power:
    type: boolean
    description: Whether to enable low-power buffered mode for the EXT1 pin.

  adi,comparator-invert:
    type: boolean
    description: Whether to invert the comparator output.

  adi,digital-input-sink-range-high:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      When not present, the digital input range is from 0 to 3700uA in steps
      of 120uA, with a ~2k series resistance.
      When present, the digital input range is from 0 to 7400uA in steps
      of 240uA, with a ~1k series resistance.

  adi,digital-input-sink-microamp:
    description: Sink current in digital input mode.
    minimum: 0
    maximum: 3700
    default: 0

  adi,digital-input-debounce-mode-counter-reset:
    type: boolean
    description: |
      When not present, a counter increments when the signal is asserted
      and decrements when the signal is de-asserted.
      When present, a counter increments while the signal is asserted and
      resets when the signal de-asserts

  adi,digital-input-unbuffered:
    type: boolean
    description: Whether to buffer digital input signals.

  adi,digital-input-short-circuit-detection:
    type: boolean
    description: Whether to detect digital input short circuits.

  adi,digital-input-open-circuit-detection:
    type: boolean
    description: Whether to detect digital input open circuits.

  adi,digital-input-threshold-mode-fixed:
    type: boolean
    description: |
      When not present, the digital input threshold range is -0.96 * AVDD
      to AVDD.
      When present, the threshold range is fixed from -19V to 30V.

  adi,dac-bipolar:
    type: boolean
    description: |
      When not present, the DAC operates in the 0V to 12V range.
      When present, the DAC operates in the -12V to 12V range.

  adi,charge-pump:
    type: boolean
    description: Whether to enable the internal charge pump.

  adi,dac-hart-slew:
    type: boolean
    description: Whether to use a HART-compatible slew rate.

  adi,dac-current-limit-low:
    type: boolean
    description: |
      When not present, the DAC short-circuit current limit is 32mA in
      either source or sink for VOUT and 4mA sink for IOUT.
      When present, the limit is 16mA in either source or sink for VOUT,
      1mA sink for IOUT.

  adi,4-wire-rtd:
    type: boolean
    description: |
      When not present, the ADC should be used for measuring 3-wire RTDs.
      When present, the ADC should be used for measuring 4-wire RTDs.

  adi,3-wire-rtd-excitation-swap:
    type: boolean
    description: Whether to swap the excitation for 3-wire RTD.

  adi,rtd-excitation-current-microamp:
    description: Excitation current to apply to RTD.
    enum: [250, 500, 750, 1000]
    default: 250

  adi,ext1-burnout:
    type: boolean
    description: Whether to enable burnout current for EXT1.

  adi,ext1-burnout-current-nanoamp:
    $ref: /schemas/types.yaml#/definitions/uint32
    description:
      Burnout current in nanoamps to be applied to EXT1.
    enum: [0, 50, 500, 1000, 10000]
    default: 0

  adi,ext1-burnout-current-polarity-sourcing:
    type: boolean
    description: |
      When not present, the burnout current polarity for EXT1 is sinking.
      When present, the burnout current polarity for EXT1 is sourcing.

  adi,ext2-burnout:
    type: boolean
    description: Whether to enable burnout current for EXT2.

  adi,ext2-burnout-current-nanoamp:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: Burnout current in nanoamps to be applied to EXT2.
    enum: [0, 50, 500, 1000, 10000]
    default: 0

  adi,ext2-burnout-current-polarity-sourcing:
    type: boolean
    description: |
      When not present, the burnout current polarity for EXT2 is sinking.
      When present, the burnout current polarity for EXT2 is sourcing.

  adi,viout-burnout:
    type: boolean
    description: Whether to enable burnout current for VIOUT.

  adi,viout-burnout-current-nanoamp:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: Burnout current in nanoamps to be applied to VIOUT.
    enum: [0, 1000, 10000]
    default: 0

  adi,viout-burnout-current-polarity-sourcing:
    type: boolean
    description: |
      When not present, the burnout current polarity for VIOUT is sinking.
      When present, the burnout current polarity for VIOUT is sourcing.

  adi,gpio0-mode:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      GPIO functions.
      0 - Disabled
      1 - Logic I/O
      2 - Comparator output
      3 - Control HART CD
      4 - Monitor HART CD
      5 - Monitor HART EOM status
    minimum: 0
    maximum: 5
    default: 0

  adi,gpio1-mode:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      GPIO functions.
      0 - Disabled
      1 - Logic I/O
      2 - Drive external digital output FET
      3 - Control HART RXD
      4 - Monitor HART RXD
      5 - Monitor HART SOM status
    minimum: 0
    maximum: 5
    default: 0

  adi,gpio2-mode:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      GPIO functions.
      0 - Disabled
      1 - Logic I/O
      2 - Drive internal digital output FET
      3 - Control HART TXD
      4 - Monitor HART TXD
      5 - Monitor HART TX complete status
    minimum: 0
    maximum: 5
    default: 0

  adi,gpio3-mode:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      GPIO functions.
      0 - Disabled
      1 - Logic I/O
      2 - High impedance
      3 - Control HART RTS
      4 - Monitor HART RTS
      5 - Monitor HART CD complete status
    minimum: 0
    maximum: 5
    default: 0

required:
  - compatible
  - reg
  - spi-cpol
  - avdd-supply

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#
  - if:
      required:
        - adi,digital-input-sink-range-high
    then:
      properties:
        adi,digital-input-sink-microamp:
          maximum: 7400

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    spi {
      #address-cells = <1>;
      #size-cells = <0>;

      addac@0 {
        compatible = "adi,ad74115h";
        reg = <0>;

        spi-max-frequency = <12000000>;
        spi-cpol;

        reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;

        interrupt-parent = <&gpio>;
        interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
        interrupt-names = "adc_rdy";

        avdd-supply = <&ad74115_avdd>;

        adi,ch-func = <1>;
        adi,conv2-mux = <2>;
        adi,conv2-range-microvolt = <(-12000000) 12000000>;

        adi,gpio0-mode = <1>;
        adi,gpio1-mode = <1>;
        adi,gpio2-mode = <1>;
        adi,gpio3-mode = <1>;

        adi,dac-bipolar;
      };
    };
...
Loading