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

Merge tag 'iio-for-5.3a' of...

Merge tag 'iio-for-5.3a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

First set of new device support, features and cleanups for IIO in the 5.3 cycle

New device support
* mt6577
  - add supprot for the mt6765 which requires a few minor additional
    new features in the driver.

Yaml binding conversions
* adxl345
* isl29018
* tsl2583
* tsl2772

Minor features and improvements
* ad5758
  - declare an of_device_id table rather than just relying on the spi
    fallback which doesn't use the manufacturer id.
  - drop a set but not used variable left from previous refactor.
* ad7816
  - Add a bit more description to kconfig text.
* ad9523
  - change calculation order to improve frequency accuracy.
* adxl372
  - declare an of_device_id table
* adt7316
  - white space.
* at91_adc
  - Use dev_get_drvdata directly rather than boucing to the platform device
    and back again.
* cros_ec
  - add an id sysfs entry to bring in line with the other implementations.
* ds5522
  - drop a check on the of_node existing as we don't actually use it for
    anything.
* kxsd9
  - declare an of_device_id table.
* maxim_thermocouple
  - declare an of_device_id table.
* mt6577
  - add dt binding entry for mt8183 which is also supported.
* rcar-gyroadc
  - tidy up unnecessary error messages.
* stm32-dfsdm
  - improved error handling.
* stmpe-adc
  - drop an unnecessary variable assignment.
  - add an of_device_id table.
  - reinit completion on begin converstion to avoid a path in which
    previous round had been interrupted, also switch to non interruptible
    wait to avoid an issue with a user program using -pg
  - simplify interrupt handling by just having them always enabled.
  - reset all interrupts on startup and in the timeout handler to
    avoid getting stuck.
* sun4i-gpadc
  - SPDX

* tag 'iio-for-5.3a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (28 commits)
  iio: adc: mediatek: mt6577-auxadc, add mt6765 support
  dt-bindings: iio: adc: mediatek: Add document for mt6765
  dt-bindings: iio: accel: adxl345: switch to YAML bindings
  iio: adc: sun4i-gpadc-iio convert to SPDX license tags
  iio: ad9523-1: Improve reported VCO frequency accuracy
  iio: dac: ds4422/ds4424 drop of_node check
  iio: stmpe-adc: Reset possible interrupts
  iio: stmpe-adc: Use wait_for_completion_timeout
  iio: stmpe-adc: Enable all stmpe-adc interrupts just once
  iio: stmpe-adc: Reinit completion struct on begin conversion
  iio: stmpe-adc: Add compatible name
  iio: stmpe-adc: Remove unnecessary assignment
  staging: iio: adc: Add paragraph to describe Kconfig symbol
  staging: iio: adt7316: match parenthesis alignment
  iio: adc: rcar-gyroadc: Remove devm_iio_device_alloc() error printing
  dt-bindings: iio: isl29018: convert bindings to YAML format
  dt-bindings: adc: mt8183: add binding document
  iio: dac: ad5758: remove set but not used variable 'dc_dc_mode'
  iio: cros_ec: add 'id' sysfs entry
  iio: adc: stm32-dfsdm: missing error case during probe
  ...
parents 941add8e 6d97024d
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -18,11 +18,11 @@ Description:
		values are 'base' and 'lid'.

What:		/sys/bus/iio/devices/iio:deviceX/id
Date:		Septembre 2017
Date:		September 2017
KernelVersion:	4.14
Contact:	linux-iio@vger.kernel.org
Description:
		This attribute is exposed by the CrOS EC legacy accelerometer
		driver and represents the sensor ID as exposed by the EC. This
		ID is used by the Android sensor service hardware abstraction
		layer (sensor HAL) through the Android container on ChromeOS.
		This attribute is exposed by the CrOS EC sensors driver and
		represents the sensor ID as exposed by the EC. This ID is used
		by the Android sensor service hardware abstraction layer (sensor
		HAL) through the Android container on ChromeOS.
+72 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/accelerometers/adi,adxl345.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices ADXL345/ADXL375 3-Axis Digital Accelerometers

maintainers:
  - Michael Hennerich <michael.hennerich@analog.com>

description: |
  Analog Devices ADXL345/ADXL375 3-Axis Digital Accelerometers that supports
  both I2C & SPI interfaces.
    http://www.analog.com/en/products/mems/accelerometers/adxl345.html
    http://www.analog.com/en/products/sensors-mems/accelerometers/adxl375.html

properties:
  compatible:
    enum:
      - adi,adxl345
      - adi,adxl375

  reg:
    maxItems: 1

  spi-cpha: true

  spi-cpol: true

  interrupts:
    maxItems: 1

required:
  - compatible
  - reg
  - interrupts

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    i2c0 {
        #address-cells = <1>;
        #size-cells = <0>;

        /* Example for a I2C device node */
        accelerometer@2a {
            compatible = "adi,adxl345";
            reg = <0x53>;
            interrupt-parent = <&gpio0>;
            interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
        };
    };
  - |
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    spi0 {
        #address-cells = <1>;
        #size-cells = <0>;

        /* Example for a SPI device node */
        accelerometer@0 {
            compatible = "adi,adxl345";
            reg = <0>;
            spi-max-frequency = <5000000>;
            spi-cpol;
            spi-cpha;
            interrupt-parent = <&gpio0>;
            interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
        };
    };
+0 −39
Original line number Diff line number Diff line
Analog Devices ADXL345/ADXL375 3-Axis Digital Accelerometers

http://www.analog.com/en/products/mems/accelerometers/adxl345.html
http://www.analog.com/en/products/sensors-mems/accelerometers/adxl375.html

Required properties:
 - compatible : should be one of
		"adi,adxl345"
		"adi,adxl375"
 - reg : the I2C address or SPI chip select number of the sensor

Required properties for SPI bus usage:
 - spi-max-frequency : set maximum clock frequency, must be 5000000
 - spi-cpol and spi-cpha : must be defined for adxl345 to enable SPI mode 3

Optional properties:
 - interrupts: interrupt mapping for IRQ as documented in
   Documentation/devicetree/bindings/interrupt-controller/interrupts.txt

Example for a I2C device node:

	accelerometer@2a {
		compatible = "adi,adxl345";
		reg = <0x53>;
		interrupt-parent = <&gpio1>;
		interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
	};

Example for a SPI device node:

	accelerometer@0 {
		compatible = "adi,adxl345";
		reg = <0>;
		spi-max-frequency = <5000000>;
		spi-cpol;
		spi-cpha;
		interrupt-parent = <&gpio1>;
		interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
	};
+2 −0
Original line number Diff line number Diff line
@@ -13,8 +13,10 @@ Required properties:
  - compatible: Should be one of:
    - "mediatek,mt2701-auxadc": For MT2701 family of SoCs
    - "mediatek,mt2712-auxadc": For MT2712 family of SoCs
    - "mediatek,mt6765-auxadc": For MT6765 family of SoCs
    - "mediatek,mt7622-auxadc": For MT7622 family of SoCs
    - "mediatek,mt8173-auxadc": For MT8173 family of SoCs
    - "mediatek,mt8183-auxadc", "mediatek,mt8173-auxadc": For MT8183 family of SoCs
  - reg: Address range of the AUXADC unit.
  - clocks: Should contain a clock specifier for each entry in clock-names
  - clock-names: Should contain "main".
+0 −27
Original line number Diff line number Diff line
* ISL 29018/29023/29035 I2C ALS, Proximity, and Infrared sensor

Required properties:

  - compatible: Should be one of
		"isil,isl29018"
		"isil,isl29023"
		"isil,isl29035"
  - reg: the I2C address of the device

Optional properties:

  - interrupts: the sole interrupt generated by the device

  Refer to interrupt-controller/interrupts.txt for generic interrupt client
  node bindings.

  - vcc-supply: phandle to the regulator that provides power to the sensor.

Example:

isl29018@44 {
	compatible = "isil,isl29018";
	reg = <0x44>;
	interrupt-parent = <&gpio>;
	interrupts = <TEGRA_GPIO(Z, 2) IRQ_TYPE_LEVEL_HIGH>;
};
Loading