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

Merge tag 'iio-for-5.5c' of...

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

Jonathan writes:

Third set of IIO new device support cleanups and fixes for the 5.5 cycle.

New device support
* ad5446
  - Support the ad5600 DAC (id only needed).
* ad7292 ADC DAC etc
  - New driver plus dt-bindings.
* veml6030 ambient light sensor
  - New driver plus dt-bindings and sysfs docs.

Features
* mpu6050
  - Explicit VDD control.
* stm32-adc
  - Allow limiting of max clock frequency from devicetree to ensure it's
    suitable for external circuitry.

yaml binding conversions
* ltc1660
* mcp3911

Fixes
* adis16480
  - Fix wrong scale factors.
  - Fix debugfs reg access by providing the callback.
* cros_ec_baro
  - Fixing missing mask entry to make available sample frequencies visible
    in sysfs.
* st_lsm6dsx
  - Explicitly handle different ODR table sizes.
  - Handle restrictions between slave ODR and accel ODR when
    both are enabled.
  - Allow ODR to be expressed more accurately by using miliHz.
* tools
  - Fix an issue with parallel builds.

Cleanups and warning fixes
* adis16136, adis16400, adis16460, adis-lib
  - Change some checks on return values to be for 0 rather than strictly
    negative. Avoids some fiddly issues with the compiler concluding some
    variables are initialized due to a mixture of error checks.
  - Assign values only on success of 'read' operations - avoiding any
    chance the compiler will falsly suggest they might be used uninitialized.
  - Whitespace and simlar cleanups.
* aspeed adc
  - devm_platfom_ioremap_resource to reduce boilerplate.
* bcm-iproc-adc
  - Stray semicolon removal.
* cc10001
  - devm_platfom_ioremap_resource to reduce boilerplate.
* dln2-adc
  - Reorganise the buffered mode setup and tear down. Part of moving towards
    being able to refactor this area of the IIO core.
* hdc100x
  - Reorganise the buffered mode setup and tear down.
* ingenic-adc
  - devm_platfom_ioremap_resource to reduce boilerplate.
* lpc18xx-adc
  - devm_platfom_ioremap_resource to reduce boilerplate.
* lpc18xx-dac
  - devm_platfom_ioremap_resource to reduce boilerplate.
* mt6577
  - devm_platfom_ioremap_resource to reduce boilerplate.
* npcm
  - devm_platfom_ioremap_resource to reduce boilerplate.
* rcar-gyroadc
  - devm_platfom_ioremap_resource to reduce boilerplate.
* spear-adc
  - devm_platfom_ioremap_resource to reduce boilerplate.
* vf610-adc
  - devm_platfom_ioremap_resource to reduce boilerplate.
* vf610-dac
  - devm_platfom_ioremap_resource to reduce boilerplate.

* tag 'iio-for-5.5c' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (43 commits)
  iio: adis16480: Add debugfs_reg_access entry
  iio: adis16480: Fix scales factors
  tools: iio: Correctly add make dependency for iio_utils
  iio: adc: Add driver support for AD7292
  dt-bindings: iio: adc: Add dt-schema for AD7292
  dt-bindings: iio: adc: Migrate MCP3911 documentation to yaml
  iio: imu: mpu6050: Add support for vdd-supply regulator
  dt-bindings: iio: imu: mpu6050: add vdd-supply
  iio: cros_ec_baro: set info_mask_shared_by_all_available field
  iio: dac: ad5446: Add support for new AD5600 DAC
  dt-bindings: iio: dac: Migrate LTC1660 documentation to yaml
  iio: documentation: light: Add veml6030 sysfs documentation
  dt-bindings: iio: light: add veml6030 ALS bindings
  iio: light: add driver for veml6030 ambient light sensor
  iio: imu: st_lsm6dsx: express odr in mHZ
  iio: imu: st_lsm6dsx: fix ODR check in st_lsm6dsx_write_raw
  iio: imu: st_lsm6dsx: explicitly define odr table size
  iio: adc: stm32: allow to tune analog clock
  dt-bindings: iio: stm32-adc: add max clock rate property
  iio: dac: vf610: Use devm_platform_ioremap_resource
  ...
parents 6366e523 4c35b7a5
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -753,6 +753,8 @@ What: /sys/.../events/in_illuminance0_thresh_falling_value
what:		/sys/.../events/in_illuminance0_thresh_rising_value
what:		/sys/.../events/in_proximity0_thresh_falling_value
what:		/sys/.../events/in_proximity0_thresh_rising_value
What:		/sys/.../events/in_illuminance_thresh_rising_value
What:		/sys/.../events/in_illuminance_thresh_falling_value
KernelVersion:	2.6.37
Contact:	linux-iio@vger.kernel.org
Description:
@@ -972,6 +974,7 @@ What: /sys/.../events/in_activity_jogging_thresh_rising_period
What:		/sys/.../events/in_activity_jogging_thresh_falling_period
What:		/sys/.../events/in_activity_running_thresh_rising_period
What:		/sys/.../events/in_activity_running_thresh_falling_period
What:		/sys/.../events/in_illuminance_thresh_either_period
KernelVersion:	2.6.37
Contact:	linux-iio@vger.kernel.org
Description:
@@ -1715,3 +1718,11 @@ Description:
		Mass concentration reading of particulate matter in ug / m3.
		pmX consists of particles with aerodynamic diameter less or
		equal to X micrometers.

What:		/sys/bus/iio/devices/iio:deviceX/events/in_illuminance_period_available
Date:		November 2019
KernelVersion:	5.4
Contact:	linux-iio@vger.kernel.org
Description:
		List of valid periods (in seconds) for which the light intensity
		must be above the threshold level before interrupt is asserted.
+104 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/adi,ad7292.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices AD7292 10-Bit Monitor and Control System

maintainers:
  - Marcelo Schmitt <marcelo.schmitt1@gmail.com>

description: |
  Analog Devices AD7292 10-Bit Monitor and Control System with ADC, DACs,
  Temperature Sensor, and GPIOs

  Specifications about the part can be found at:
    https://www.analog.com/media/en/technical-documentation/data-sheets/ad7292.pdf

properties:
  compatible:
    enum:
      - adi,ad7292

  reg:
    maxItems: 1

  vref-supply:
    description: |
      The regulator supply for ADC and DAC reference voltage.

  spi-cpha: true

  '#address-cells':
    const: 1

  '#size-cells':
    const: 0

required:
  - compatible
  - reg
  - spi-cpha

patternProperties:
  "^channel@[0-7]$":
    type: object
    description: |
      Represents the external channels which are connected to the ADC.
      See Documentation/devicetree/bindings/iio/adc/adc.txt.

    properties:
      reg:
        description: |
          The channel number. It can have up to 8 channels numbered from 0 to 7.
        items:
          maximum: 7

      diff-channels:
        description: see Documentation/devicetree/bindings/iio/adc/adc.txt
        maxItems: 1

    required:
      - reg

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

      ad7292: adc@0 {
        compatible = "adi,ad7292";
        reg = <0>;
        spi-max-frequency = <25000000>;
        vref-supply = <&adc_vref>;
        spi-cpha;

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

        channel@0 {
          reg = <0>;
          diff-channels = <0 1>;
        };
        channel@2 {
          reg = <2>;
        };
        channel@3 {
          reg = <3>;
        };
        channel@4 {
          reg = <4>;
        };
        channel@5 {
          reg = <5>;
        };
        channel@6 {
          reg = <6>;
        };
        channel@7 {
          reg = <7>;
        };
      };
    };
+0 −30
Original line number Diff line number Diff line
* Microchip MCP3911 Dual channel analog front end (ADC)

Required properties:
 - compatible: Should be "microchip,mcp3911"
 - reg: SPI chip select number for the device

Recommended properties:
 - spi-max-frequency: Definition as per
	 Documentation/devicetree/bindings/spi/spi-bus.txt.
	 Max frequency for this chip is 20MHz.

Optional properties:
 - clocks: Phandle and clock identifier for sampling clock
 - interrupt-parent: Phandle to the parent interrupt controller
 - interrupts: IRQ line for the ADC
 - microchip,device-addr: Device address when multiple MCP3911 chips are present on the
	same SPI bus. Valid values are 0-3. Defaults to 0.
 - vref-supply: Phandle to the external reference voltage supply.

Example:
adc@0 {
	compatible = "microchip,mcp3911";
	reg = <0>;
	interrupt-parent = <&gpio5>;
	interrupts = <15 IRQ_TYPE_EDGE_RISING>;
	spi-max-frequency = <20000000>;
	microchip,device-addr = <0>;
	vref-supply = <&vref_reg>;
	clocks = <&xtal>;
};
+71 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
# Copyright 2019 Marcus Folkesson <marcus.folkesson@gmail.com>
%YAML 1.2
---
$id: "http://devicetree.org/schemas/bindings/iio/adc/microchip,mcp3911.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"

title: Microchip MCP3911 Dual channel analog front end (ADC)

maintainers:
  - Marcus Folkesson <marcus.folkesson@gmail.com>
  - Kent Gustavsson <nedo80@gmail.com>

description: |
  Bindings for the Microchip MCP3911 Dual channel ADC device. Datasheet can be
  found here: https://ww1.microchip.com/downloads/en/DeviceDoc/20002286C.pdf

properties:
  compatible:
    enum:
      - microchip,mcp3911

  reg:
    maxItems: 1

  spi-max-frequency:
    maximum: 20000000

  clocks:
    description: |
      Phandle and clock identifier for external sampling clock.
      If not specified, the internal crystal oscillator will be used.
    maxItems: 1

  interrupts:
    description: IRQ line of the ADC
    maxItems: 1

  microchip,device-addr:
    description: Device address when multiple MCP3911 chips are present on the same SPI bus.
    allOf:
      - $ref: /schemas/types.yaml#/definitions/uint32
      - enum: [0, 1, 2, 3]
      - default: 0

  vref-supply:
    description: |
      Phandle to the external reference voltage supply.
      If not specified, the internal voltage reference (1.2V) will be used.

required:
  - compatible
  - reg

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

      adc@0 {
        compatible = "microchip,mcp3911";
        reg = <0>;
        interrupt-parent = <&gpio5>;
        interrupts = <15 2>;
        spi-max-frequency = <20000000>;
        microchip,device-addr = <0>;
        vref-supply = <&vref_reg>;
        clocks = <&xtal>;
      };
    };
+2 −0
Original line number Diff line number Diff line
@@ -53,6 +53,8 @@ Optional properties:
  analog input switches on stm32mp1.
- st,syscfg: Phandle to system configuration controller. It can be used to
  control the analog circuitry on stm32mp1.
- st,max-clk-rate-hz: Allow to specify desired max clock rate used by analog
  circuitry.

Contents of a stm32 adc child node:
-----------------------------------
Loading