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

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

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

Jonathan writes:

Second set of new device support, cleanups etc for IIO/Counters in the 5.9 cycle

There are two merge commits in here of immutable branches that may
also be picked up through other trees (clocksource and input)

I've put a few late breaking fixes in here that aren't worth rushing
in before the  merge window.  One major fix for an issue introduced
in the last set that can result in devices not having their parent set.

This set is dominated by W=1 cleanups from Lee Jones. I won't list them
all separately.  They are mostly:
* Kernel doc fixes
* Unused variable removal.
* Suppression of unused stuff that is static in headers.

Counters subsystem
* atmel-tcb
  - New counter driver after various cleanups of existing tcb code and bindings.

Device support
* stk311
  - Trivial addition of ID for STK311-X variant.

yaml conversions
* kionix,kxsd9
* ti,ads8688

Features
* jz47xx
  - Add support for touch screen channels. In this particular case the
    boards in question actually wire a joystick to them so we want them
    as simple voltage channels. The joystick driver will probably go
    via the input tree.

Cleanups + fixes
* core
  - A rebase issue in recent major refactoring dropped the assignment of
    of the device parent in the core. Put it back.
* ad5592r
  - Fix unbalanced mutex unlocks in *_read_raw()
* ad7124
  - Move chip ID and name to the chip_info table plus add a read of the
    revision register to check the device is working during probe.
* ad7192
  - Ridy up ordering to put the match table near the end fo the file where it
    is used.
* lsm6dsx
  - Reset the hardware timestamp after a resume to avoid an issue with
    missaligned timestamps after suspend.
* jz47xx
  - Error checks on clk_enable() calls.
  - xlate callaback to find channel index.
  - Use separate chan_spec arrays for different variants rather than
    parts of a single list.  Simplifies code.

* tag 'iio-for-5.9b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (69 commits)
  iio: imu: st_lsm6dsx: reset hw ts after resume
  iio: dac: ad5592r: fix unbalanced mutex unlocks in ad5592r_read_raw()
  iio: core: fix/re-introduce back parent assignment
  iio: adc: ad7124: move chip ID & name on the chip_info table
  counter: Add microchip TCB capture counter
  dt-bindings: counter: microchip-tcb-capture counter
  dt-bindings: microchip: atmel,at91rm9200-tcb: add sama5d2 compatible
  dt-bindings: atmel-tcb: convert bindings to json-schema
  ARM: at91: add atmel tcb capabilities
  IIO: Ingenic JZ47xx: Add touchscreen mode.
  dt-bindings: iio/adc: Add touchscreen idx for JZ47xx SoC ADC
  iio/adc: ingenic: Retrieve channels list from soc data struct
  IIO: Ingenic JZ47xx: Add xlate cb to retrieve correct channel idx
  IIO: Ingenic JZ47xx: Error check clk_enable calls.
  dt-bindings: iio: ti,ads8688 yaml conversion
  iio: light: stk3310: add chip id for STK3311-X variant
  dt-bindings: iio: accel: kionix,kxsd9 yaml conversion.
  iio: adc: ad7192: move ad7192_of_match table closer to the end of the file
  iio: adc: rockchip_saradc: Demote seemingly unintentional kerneldoc header
  iio: imu: st_lsm6dsx: st_lsm6dsx: Mark 'st_lsm6dsx_accel_ext_info' as __maybe_unused
  ...
parents 70476feb a1bab939
Loading
Loading
Loading
Loading
+0 −22
Original line number Diff line number Diff line
Kionix KXSD9 Accelerometer device tree bindings

Required properties:
 - compatible: 		should be set to "kionix,kxsd9"
 - reg:			i2c slave address

Optional properties:
 - vdd-supply:		The input supply for VDD
 - iovdd-supply:	The input supply for IOVDD
 - interrupts:		The movement detection interrupt
 - mount-matrix:	See mount-matrix.txt

Example:

kxsd9@18 {
	compatible = "kionix,kxsd9";
	reg = <0x18>;
	interrupt-parent = <&foo>;
	interrupts = <57 IRQ_TYPE_EDGE_FALLING>;
	iovdd-supply = <&bar>;
	vdd-supply = <&baz>;
};
+65 −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/accel/kionix,kxsd9.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Kionix KXSD9 Accelerometer

maintainers:
  - Jonathan Cameron <jic23@kernel.org>

description: |
  3 axis 12 bit accelerometer with +-8G range on all axes. Also has a
  12 bit auxiliary ADC channel. Interface is either SPI or I2C.

properties:
  compatible:
    const: kionix,kxsd9

  reg:
    maxItems: 1

  vdd-supply: true
  iovdd-supply: true

  interrupts:
    maxItems: 1

  mount-matrix:
    description: an optional 3x3 mounting rotation matrix.

required:
  - compatible
  - reg

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

        accel@18 {
            compatible = "kionix,kxsd9";
            reg = <0x18>;
            iovdd-supply = <&iovdd>;
            vdd-supply = <&vdd>;
            interrupts = <57 IRQ_TYPE_EDGE_FALLING>;
            mount-matrix = "-0.984807753012208", "0",  "-0.173648177666930",
                           "0",                  "-1", "0",
                           "-0.173648177666930", "0",  "0.984807753012208";
        };
    };
  - |
    # include <dt-bindings/interrupt-controller/irq.h>
    spi {
        #address-cells = <1>;
        #size-cells = <0>;
        accel@0 {
            compatible = "kionix,kxsd9";
            reg = <0>;
            spi-max-frequency = <10000000>;
        };
    };
...
+45 −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/ti,ads8688.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Texas Instruments' ADS8684 and ADS8688 ADC chip

maintainers:
  - Sean Nyekjaer <sean@geanix.com>

description: |
   SPI 16bit ADCs with 4/8 channels.

properties:
  compatible:
    enum:
      - ti,ads8684
      - ti,ads8688

  reg:
    maxItems: 1

  vref-supply:
    description: Optional external reference.  If not supplied, assume
      REFSEL input tied low to enable the internal reference.

required:
  - compatible
  - reg

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

        adc@0 {
            compatible = "ti,ads8688";
            reg = <0>;
            vref-supply = <&vdd_supply>;
            spi-max-frequency = <1000000>;
        };
    };
...
+0 −20
Original line number Diff line number Diff line
* Texas Instruments' ADS8684 and ADS8688 ADC chip

Required properties:
 - compatible: Should be "ti,ads8684" or "ti,ads8688"
 - reg: spi chip select number for the device

Recommended properties:
 - spi-max-frequency: Definition as per
		Documentation/devicetree/bindings/spi/spi-bus.txt

Optional properties:
 - vref-supply: The regulator supply for ADC reference voltage

Example:
adc@0 {
	compatible = "ti,ads8688";
	reg = <0>;
	vref-supply = <&vdd_supply>;
	spi-max-frequency = <1000000>;
};
+0 −56
Original line number Diff line number Diff line
* Device tree bindings for Atmel Timer Counter Blocks
- compatible: Should be "atmel,<chip>-tcb", "simple-mfd", "syscon".
  <chip> can be "at91rm9200" or "at91sam9x5"
- reg: Should contain registers location and length
- #address-cells: has to be 1
- #size-cells: has to be 0
- interrupts: Should contain all interrupts for the TC block
  Note that you can specify several interrupt cells if the TC
  block has one interrupt per channel.
- clock-names: tuple listing input clock names.
	Required elements: "t0_clk", "slow_clk"
	Optional elements: "t1_clk", "t2_clk"
- clocks: phandles to input clocks.

The TCB can expose multiple subdevices:
 * a timer
   - compatible: Should be "atmel,tcb-timer"
   - reg: Should contain the TCB channels to be used. If the
     counter width is 16 bits (at91rm9200-tcb), two consecutive
     channels are needed. Else, only one channel will be used.

Examples:

One interrupt per TC block:
	tcb0: timer@fff7c000 {
		compatible = "atmel,at91rm9200-tcb", "simple-mfd", "syscon";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0xfff7c000 0x100>;
		interrupts = <18 4>;
		clocks = <&tcb0_clk>, <&clk32k>;
		clock-names = "t0_clk", "slow_clk";

		timer@0 {
			compatible = "atmel,tcb-timer";
			reg = <0>, <1>;
		};

		timer@2 {
			compatible = "atmel,tcb-timer";
			reg = <2>;
		};
	};

One interrupt per TC channel in a TC block:
	tcb1: timer@fffdc000 {
		compatible = "atmel,at91rm9200-tcb", "simple-mfd", "syscon";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0xfffdc000 0x100>;
		interrupts = <26 4>, <27 4>, <28 4>;
		clocks = <&tcb1_clk>, <&clk32k>;
		clock-names = "t0_clk", "slow_clk";
	};

Loading