Commit e6874fc2 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull staging and IIO driver updates from Greg KH:
 "Here is the big staging/iio driver update for 5.4-rc1.

  Lots of churn here, with a few driver/filesystems moving out of
  staging finally:

     - erofs moved out of staging

     - greybus core code moved out of staging

  Along with that, a new filesytem has been added:

     - extfat

  to provide support for those devices requiring that filesystem (i.e.
  transfer devices to/from windows systems or printers)

  Other than that, there a number of new IIO drivers, and lots and lots
  and lots of staging driver cleanups and minor fixes as people continue
  to dig into those for easy changes.

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'staging-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (453 commits)
  Staging: gasket: Use temporaries to reduce line length.
  Staging: octeon: Avoid several usecases of strcpy
  staging: vhciq_core: replace snprintf with scnprintf
  staging: wilc1000: avoid twice IRQ handler execution for each single interrupt
  staging: wilc1000: remove unused interrupt status handling code
  staging: fbtft: make several arrays static const, makes object smaller
  staging: rtl8188eu: make two arrays static const, makes object smaller
  staging: rtl8723bs: core: Remove Macro "IS_MAC_ADDRESS_BROADCAST"
  dt-bindings: anybus-controller: move to staging/ tree
  staging: emxx_udc: remove local TRUE/FALSE definition
  staging: wilc1000: look for rtc_clk clock
  staging: dt-bindings: wilc1000: add optional rtc_clk property
  staging: nvec: make use of devm_platform_ioremap_resource
  staging: exfat: drop unused function parameter
  Staging: exfat: Avoid use of strcpy
  staging: exfat: use integer constants
  staging: exfat: cleanup spacing for casts
  staging: exfat: cleanup spacing for operators
  staging: rtl8723bs: hal: remove redundant variable n
  staging: pi433: Fix typo in documentation
  ...
parents e444d51b 3fb73edd
Loading
Loading
Loading
Loading
+0 −23
Original line number Diff line number Diff line
@@ -91,29 +91,6 @@ Description:
		When counting down the counter start from preset value
		and fire event when reach 0.

What:		/sys/bus/iio/devices/iio:deviceX/in_count_quadrature_mode_available
KernelVersion:	4.12
Contact:	benjamin.gaignard@st.com
Description:
		Reading returns the list possible quadrature modes.

What:		/sys/bus/iio/devices/iio:deviceX/in_count0_quadrature_mode
KernelVersion:	4.12
Contact:	benjamin.gaignard@st.com
Description:
		Configure the device counter quadrature modes:
		channel_A:
			Encoder A input servers as the count input and B as
			the UP/DOWN direction control input.

		channel_B:
			Encoder B input serves as the count input and A as
			the UP/DOWN direction control input.

		quadrature:
			Encoder A and B inputs are mixed to get direction
			and count with a scale of 0.25.

What:		/sys/bus/iio/devices/iio:deviceX/in_count_enable_mode_available
KernelVersion:	4.12
Contact:	benjamin.gaignard@st.com
+121 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
# Copyright 2019 Analog Devices Inc.
%YAML 1.2
---
$id: http://devicetree.org/schemas/bindings/iio/adc/adi,ad7192.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices AD7192 ADC device driver

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

description: |
  Bindings for the Analog Devices AD7192 ADC device. Datasheet can be
  found here:
  https://www.analog.com/media/en/technical-documentation/data-sheets/AD7192.pdf

properties:
  compatible:
    enum:
      - adi,ad7190
      - adi,ad7192
      - adi,ad7193
      - adi,ad7195

  reg:
    maxItems: 1

  spi-cpol: true

  spi-cpha: true

  clocks:
    maxItems: 1
    description: phandle to the master clock (mclk)

  clock-names:
    items:
      - const: mclk

  interrupts:
    maxItems: 1

  dvdd-supply:
    description: DVdd voltage supply
    items:
      - const: dvdd

  avdd-supply:
    description: AVdd voltage supply
    items:
      - const: avdd

  adi,rejection-60-Hz-enable:
    description: |
      This bit enables a notch at 60 Hz when the first notch of the sinc
      filter is at 50 Hz. When REJ60 is set, a filter notch is placed at
      60 Hz when the sinc filter first notch is at 50 Hz. This allows
      simultaneous 50 Hz/ 60 Hz rejection.
    type: boolean

  adi,refin2-pins-enable:
    description: |
      External reference applied between the P1/REFIN2(+) and P0/REFIN2(−) pins.
    type: boolean

  adi,buffer-enable:
    description: |
      Enables the buffer on the analog inputs. If cleared, the analog inputs
      are unbuffered, lowering the power consumption of the device. If this
      bit is set, the analog inputs are buffered, allowing the user to place
      source impedances on the front end without contributing gain errors to
      the system.
    type: boolean

  adi,burnout-currents-enable:
    description: |
      When this bit is set to 1, the 500 nA current sources in the signal
      path are enabled. When BURN = 0, the burnout currents are disabled.
      The burnout currents can be enabled only when the buffer is active
      and when chop is disabled.
    type: boolean

  bipolar:
    description: see Documentation/devicetree/bindings/iio/adc/adc.txt
    type: boolean

required:
  - compatible
  - reg
  - clocks
  - clock-names
  - interrupts
  - dvdd-supply
  - avdd-supply
  - spi-cpol
  - spi-cpha

examples:
  - |
    spi0 {
      adc@0 {
        compatible = "adi,ad7192";
        reg = <0>;
        spi-max-frequency = <1000000>;
        spi-cpol;
        spi-cpha;
        clocks = <&ad7192_mclk>;
        clock-names = "mclk";
        #interrupt-cells = <2>;
        interrupts = <25 0x2>;
        interrupt-parent = <&gpio>;
        dvdd-supply = <&dvdd>;
        avdd-supply = <&avdd>;

        adi,refin2-pins-enable;
        adi,rejection-60-Hz-enable;
        adi,buffer-enable;
        adi,burnout-currents-enable;
        };
    };
+0 −66
Original line number Diff line number Diff line
Analog Devices AD7606 Simultaneous Sampling ADC

Required properties for the AD7606:

- compatible: Must be one of
	* "adi,ad7605-4"
	* "adi,ad7606-8"
	* "adi,ad7606-6"
	* "adi,ad7606-4"
	* "adi,ad7616"
- reg: SPI chip select number for the device
- spi-max-frequency: Max SPI frequency to use
	see: Documentation/devicetree/bindings/spi/spi-bus.txt
- spi-cpha: See Documentation/devicetree/bindings/spi/spi-bus.txt
- avcc-supply: phandle to the Avcc power supply
- interrupts: IRQ line for the ADC
	see: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
- adi,conversion-start-gpios: must be the device tree identifier of the CONVST pin.
		  This logic input is used to initiate conversions on the analog
		  input channels. As the line is active high, it should be marked
		  GPIO_ACTIVE_HIGH.

Optional properties:

- reset-gpios: must be the device tree identifier of the RESET pin. If specified,
	       it will be asserted during driver probe. As the line is active high,
	       it should be marked GPIO_ACTIVE_HIGH.
- standby-gpios: must be the device tree identifier of the STBY pin. This pin is used
		to place the AD7606 into one of two power-down modes, Standby mode or
		Shutdown mode. As the line is active low, it should be marked
		GPIO_ACTIVE_LOW.
- adi,first-data-gpios: must be the device tree identifier of the FRSTDATA pin.
		    The FRSTDATA output indicates when the first channel, V1, is
		    being read back on either the parallel, byte or serial interface.
		    As the line is active high, it should be marked GPIO_ACTIVE_HIGH.
- adi,range-gpios: must be the device tree identifier of the RANGE pin. The polarity on
	      this pin determines the input range of the analog input channels. If
	      this pin is tied to a logic high, the analog input range is ±10V for
	      all channels. If this pin is tied to a logic low, the analog input range
	      is ±5V for all channels. As the line is active high, it should be marked
	      GPIO_ACTIVE_HIGH.
- adi,oversampling-ratio-gpios: must be the device tree identifier of the over-sampling
				mode pins. As the line is active high, it should be marked
				GPIO_ACTIVE_HIGH.

Example:

	adc@0 {
		compatible = "adi,ad7606-8";
		reg = <0>;
		spi-max-frequency = <1000000>;
		spi-cpol;

		avcc-supply = <&adc_vref>;

		interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
		interrupt-parent = <&gpio>;

		adi,conversion-start-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
		reset-gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
		adi,first-data-gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
		adi,oversampling-ratio-gpios = <&gpio 18 GPIO_ACTIVE_HIGH
						&gpio 23 GPIO_ACTIVE_HIGH
						&gpio 26 GPIO_ACTIVE_HIGH>;
		standby-gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
	};
+138 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/adi,ad7606.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices AD7606 Simultaneous Sampling ADC

maintainers:
  - Beniamin Bia <beniamin.bia@analog.com>
  - Stefan Popa <stefan.popa@analog.com>

description: |
  Analog Devices AD7606 Simultaneous Sampling ADC
  https://www.analog.com/media/en/technical-documentation/data-sheets/ad7606_7606-6_7606-4.pdf
  https://www.analog.com/media/en/technical-documentation/data-sheets/AD7606B.pdf
  https://www.analog.com/media/en/technical-documentation/data-sheets/AD7616.pdf

properties:
  compatible:
    enum:
      - adi,ad7605-4
      - adi,ad7606-8
      - adi,ad7606-6
      - adi,ad7606-4
      - adi,ad7606b
      - adi,ad7616

  reg:
    maxItems: 1

  spi-cpha: true

  avcc-supply:
    description:
      Phandle to the Avcc power supply
    maxItems: 1

  interrupts:
    maxItems: 1

  adi,conversion-start-gpios:
    description:
      Must be the device tree identifier of the CONVST pin.
      This logic input is used to initiate conversions on the analog
      input channels. As the line is active high, it should be marked
      GPIO_ACTIVE_HIGH.
    maxItems: 1

  reset-gpios:
    description:
      Must be the device tree identifier of the RESET pin. If specified,
      it will be asserted during driver probe. As the line is active high,
      it should be marked GPIO_ACTIVE_HIGH.
    maxItems: 1

  standby-gpios:
    description:
       Must be the device tree identifier of the STBY pin. This pin is used
       to place the AD7606 into one of two power-down modes, Standby mode or
       Shutdown mode. As the line is active low, it should be marked
       GPIO_ACTIVE_LOW.
    maxItems: 1

  adi,first-data-gpios:
    description:
      Must be the device tree identifier of the FRSTDATA pin.
      The FRSTDATA output indicates when the first channel, V1, is
      being read back on either the parallel, byte or serial interface.
      As the line is active high, it should be marked GPIO_ACTIVE_HIGH.
    maxItems: 1

  adi,range-gpios:
    description:
      Must be the device tree identifier of the RANGE pin. The polarity on
      this pin determines the input range of the analog input channels. If
      this pin is tied to a logic high, the analog input range is ±10V for
      all channels. If this pin is tied to a logic low, the analog input range
      is ±5V for all channels. As the line is active high, it should be marked
      GPIO_ACTIVE_HIGH.
    maxItems: 1

  adi,oversampling-ratio-gpios:
    description:
      Must be the device tree identifier of the over-sampling
      mode pins. As the line is active high, it should be marked
      GPIO_ACTIVE_HIGH.
    maxItems: 1

  adi,sw-mode:
    description:
      Software mode of operation, so far available only for ad7616 and ad7606b.
      It is enabled when all three oversampling mode pins are connected to
      high level. The device is configured by the corresponding registers. If the
      adi,oversampling-ratio-gpios property is defined, then the driver will set the
      oversampling gpios to high. Otherwise, it is assumed that the pins are hardwired
      to VDD.
    type: boolean

required:
  - compatible
  - reg
  - spi-cpha
  - avcc-supply
  - interrupts
  - adi,conversion-start-gpios

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

        adc@0 {
                compatible = "adi,ad7606-8";
                reg = <0>;
                spi-max-frequency = <1000000>;
                spi-cpol;
                spi-cpha;

                avcc-supply = <&adc_vref>;

                interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
                interrupt-parent = <&gpio>;

                adi,conversion-start-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
                reset-gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
                adi,first-data-gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
                adi,oversampling-ratio-gpios = <&gpio 18 GPIO_ACTIVE_HIGH
                                                &gpio 23 GPIO_ACTIVE_HIGH
                                                &gpio 26 GPIO_ACTIVE_HIGH>;
                standby-gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
                adi,sw-mode;
        };
    };
...
+6 −0
Original line number Diff line number Diff line
@@ -47,6 +47,12 @@ Required properties:
Optional properties:
- A pinctrl state named "default" for each ADC channel may be defined to set
  inX ADC pins in mode of operation for analog input on external pin.
- booster-supply: Phandle to the embedded booster regulator that can be used
  to supply ADC analog input switches on stm32h7 and stm32mp1.
- vdd-supply: Phandle to the vdd input voltage. It can be used to supply ADC
  analog input switches on stm32mp1.
- st,syscfg: Phandle to system configuration controller. It can be used to
  control the analog circuitry on stm32mp1.

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