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

Merge tag 'iio-for-5.13b-take2' of...

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

Jonathan writes:

2nd set of IIO features, cleanups etc for 5.13

Trying again as a wrong fixes tag managed to beat the checking script
I was running.

A few of these are fixes for major rework earlier in cycle.
Bulk of patches are the ad7150 pre graduation cleanup, some link
fixes in maintainers and set using the new IRQF_NO_AUTOEN flag.

Note includes a merge of a tag from tip to get the IRQF_NO_AUTOEN
support (one patch only from Barry Song)

Staging graduation
* adi,ad7150 CDC
  - A lot of precursor patches cleaning it up first.
  - Includes core support for timeout event ABI where after a time
    a adaptive threshold jumps to fix slow tracking problems.

Cleanups and minor / late breaking fixes
* core
  - Use sysfs_emit() and sysfs_emit_at() as appropriate
  - Fix a bug introduced in this cycle for iio_read_channel_processed_scale()
  - Fix handling of getfd ioctl as IIO_IOCTL_UNHANDLED is a valid ioctl number
  - Tidy up some pointless type conversion in string formatting and odd
    indentation.
* dac
  - Use sysfs_emit() for powerdown attribute show() functions.
* docs
  - Fix dead links due to txt to yaml binding conversions.
* treewide
  - Use IRQF_NO_AUTOEN
* various
  - Typo fixes in comments.
* triggers/hr-timer-trigger
  - Fix an overflow handing issue.
* ad,ad7923
  - Device managed functions in probe()
* ad,ad9467
  - Fix kconfig dependency issue
* adi,adis16201
  - Fix a wrong axis assignment that stops the driver loading.
* invensense,mpu6050
  - Allow use as a standalone trigger (no channels enabled)
  - Drop unnecessary manual assignment of indio_dev->modes
  - Make device function in a basic way if no interrupt wired.
  - Sanity check scale writes.
* semtech,sx9310
  - Fix access to a variable length array in DT binding.
  - Sanity check input before writing debounce register.
* st,stm32-dfsdm
  - Drop __func__ from dev_dbg() and pr_debug().
* yamaha,yas530
  - Include asm/unaligned.h instead of be_byteshift.h
  - Fix an issue with return value on an error path.

* tag 'iio-for-5.13b-take2' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (76 commits)
  iio: inv_mpu6050: Fully validate gyro and accel scale writes
  iio: sx9310: Fix write_.._debounce()
  iio: sx9310: Fix access to variable DT array
  iio: adc: Kconfig: make AD9467 depend on ADI_AXI_ADC symbol
  iio: magnetometer: yas530: Include right header
  iio: magnetometer: yas530: Fix return value on error path
  iio:cdc:ad7150: Fix use of uninitialized ret
  iio: hrtimer-trigger: Fix potential integer overflow in iio_hrtimer_store_sampling_frequency
  iio:adc: Fix trivial typo
  iio:adc:ad7476: Fix remove handling
  iio:adc:ad_sigma_delta: Use IRQF_NO_AUTOEN rather than request and disable
  iio:imu:adis: Use IRQF_NO_AUTOEN instead of irq request then disable
  iio:chemical:scd30: Use IRQF_NO_AUTOEN to avoid irq request then disable
  iio:adc:sun4i-gpadc: Use new IRQF_NO_AUTOEN flag instead of request then disable
  iio:adc:nau7802: Use IRQF_NO_AUTOEN instead of request then disable
  iio:adc:exynos-adc: Use new IRQF_NO_AUTOEN flag rather than separate irq_disable()
  iio:adc:ad7766: Use new IRQF_NO_AUTOEN to reduce boilerplate
  iio: buffer: use sysfs_attr_init() on allocated attrs
  iio: trigger: Fix strange (ladder-type) indentation
  iio: trigger: Replace explicit casting and wrong specifier with proper one
  ...
parents e91cafdf e09fe913
Loading
Loading
Loading
Loading
+33 −0
Original line number Diff line number Diff line
@@ -371,6 +371,7 @@ What: /sys/bus/iio/devices/iio:deviceX/in_humidityrelative_offset
What:		/sys/bus/iio/devices/iio:deviceX/in_magn_offset
What:		/sys/bus/iio/devices/iio:deviceX/in_rot_offset
What:		/sys/bus/iio/devices/iio:deviceX/in_angl_offset
What:		/sys/bus/iio/devices/iio:deviceX/in_capacitanceX_offset
KernelVersion:	2.6.35
Contact:	linux-iio@vger.kernel.org
Description:
@@ -702,6 +703,8 @@ What: /sys/.../iio:deviceX/events/in_voltageY_thresh_falling_en
What:		/sys/.../iio:deviceX/events/in_voltageY_thresh_either_en
What:		/sys/.../iio:deviceX/events/in_tempY_thresh_rising_en
What:		/sys/.../iio:deviceX/events/in_tempY_thresh_falling_en
What:		/sys/.../iio:deviceX/events/in_capacitanceY_thresh_rising_en
What:		/sys/.../iio:deviceX/events/in_capacitanceY_thresh_falling_en
KernelVersion:	2.6.37
Contact:	linux-iio@vger.kernel.org
Description:
@@ -779,6 +782,32 @@ Description:
		a given event type is enabled a future point (and not those for
		whatever event was previously enabled).

What:		/sys/.../events/in_capacitanceY_adaptive_thresh_rising_en
What:		/sys/.../events/in_capacitanceY_adaptive_thresh_falling_en
KernelVersion:	5.13
Contact:	linux-iio@vger.kernel.org
Descrption:
		Adaptive thresholds are similar to normal fixed thresholds
		but the value is expressed as an offset from a value which
		provides a low frequency approximation of the channel itself.
		Thus these detect if a rapid change occurs in the specified
		direction which crosses tracking value + offset.
		Tracking value calculation is devices specific.

What:		/sys/.../in_capacitanceY_adaptive_thresh_rising_timeout
What:		/sys/.../in_capacitanceY_adaptive_thresh_falling_timeout
KernelVersion:	5.11
Contact:	linux-iio@vger.kernel.org
Descrption:
		When adaptive thresholds are used, the tracking signal
		may adjust too slowly to step changes in the raw signal.
		*_timeout (in seconds) specifies a time for which the
		difference between the slow tracking signal and the raw
		signal is allowed to remain out-of-range before a reset
		event occurs in which the tracking signal is made equal
		to the raw signal, allowing slow tracking to resume and the
		adaptive threshold event detection to function as expected.

What:		/sys/.../events/in_accel_thresh_rising_value
What:		/sys/.../events/in_accel_thresh_falling_value
What:		/sys/.../events/in_accel_x_raw_thresh_rising_value
@@ -819,6 +848,10 @@ 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
What:		/sys/.../events/in_capacitanceY_thresh_rising_value
What:		/sys/.../events/in_capacitanceY_thresh_falling_value
What:		/sys/.../events/in_capacitanceY_thresh_adaptive_rising_value
What:		/sys/.../events/in_capacitanceY_thresh_falling_rising_value
KernelVersion:	2.6.37
Contact:	linux-iio@vger.kernel.org
Description:
+69 −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/cdc/adi,ad7150.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog device AD7150 and similar capacitance to digital convertors.

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

properties:
  compatible:
    enum:
      - adi,ad7150
      - adi,ad7151
      - adi,ad7156

  reg:
    maxItems: 1

  vdd-supply: true

  interrupts: true

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - adi,ad7150
              - adi,ad7156
    then:
      properties:
        interrupts:
          minItems: 2
          maxItems: 2
  - if:
      properties:
        compatible:
          contains:
            const: adi,ad7151
    then:
      properties:
        interrupts:
          minItems: 1
          maxItems: 1

required:
  - compatible
  - reg

additionalProperties: false

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

        cdc@48 {
            compatible = "adi,ad7150";
            reg = <0x48>;
            interrupts = <25 2>, <26 2>;
            interrupt-parent = <&gpio>;
        };
    };
...
+13 −13
Original line number Diff line number Diff line
@@ -1141,7 +1141,7 @@ W: http://ez.analog.com/community/linux-device-drivers
F:	Documentation/ABI/testing/sysfs-bus-iio-frequency-ad9523
F:	Documentation/ABI/testing/sysfs-bus-iio-frequency-adf4350
F:	Documentation/devicetree/bindings/iio/*/adi,*
F:	Documentation/devicetree/bindings/iio/dac/ad5758.txt
F:	Documentation/devicetree/bindings/iio/dac/adi,ad5758.yaml
F:	drivers/iio/*/ad*
F:	drivers/iio/adc/ltc249*
F:	drivers/iio/amplifiers/hmc425a.c
@@ -8198,7 +8198,7 @@ M: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
L:	linux-iio@vger.kernel.org
S:	Maintained
W:	http://www.st.com/
F:	Documentation/devicetree/bindings/iio/humidity/hts221.txt
F:	Documentation/devicetree/bindings/iio/humidity/st,hts221.yaml
F:	drivers/iio/humidity/hts221*
HUAWEI ETHERNET DRIVER
@@ -8664,7 +8664,7 @@ M: Peter Rosin <peda@axentia.se>
L:	linux-iio@vger.kernel.org
S:	Maintained
F:	Documentation/ABI/testing/sysfs-bus-iio-dac-dpot-dac
F:	Documentation/devicetree/bindings/iio/dac/dpot-dac.txt
F:	Documentation/devicetree/bindings/iio/dac/dpot-dac.yaml
F:	drivers/iio/dac/dpot-dac.c
IIO ENVELOPE DETECTOR
@@ -8672,7 +8672,7 @@ M: Peter Rosin <peda@axentia.se>
L:	linux-iio@vger.kernel.org
S:	Maintained
F:	Documentation/ABI/testing/sysfs-bus-iio-adc-envelope-detector
F:	Documentation/devicetree/bindings/iio/adc/envelope-detector.txt
F:	Documentation/devicetree/bindings/iio/adc/envelope-detector.yaml
F:	drivers/iio/adc/envelope-detector.c
IIO MULTIPLEXER
@@ -8706,9 +8706,9 @@ IIO UNIT CONVERTER
M:	Peter Rosin <peda@axentia.se>
L:	linux-iio@vger.kernel.org
S:	Maintained
F:	Documentation/devicetree/bindings/iio/afe/current-sense-amplifier.txt
F:	Documentation/devicetree/bindings/iio/afe/current-sense-shunt.txt
F:	Documentation/devicetree/bindings/iio/afe/voltage-divider.txt
F:	Documentation/devicetree/bindings/iio/afe/current-sense-amplifier.yaml
F:	Documentation/devicetree/bindings/iio/afe/current-sense-shunt.yaml
F:	Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml
F:	drivers/iio/afe/iio-rescale.c
IKANOS/ADI EAGLE ADSL USB DRIVER
@@ -11798,7 +11798,7 @@ MICROCHIP SAMA5D2-COMPATIBLE ADC DRIVER
M:	Eugen Hristev <eugen.hristev@microchip.com>
L:	linux-iio@vger.kernel.org
S:	Supported
F:	Documentation/devicetree/bindings/iio/adc/at91-sama5d2_adc.txt
F:	Documentation/devicetree/bindings/iio/adc/atmel,sama5d2-adc.yaml
F:	drivers/iio/adc/at91-sama5d2_adc.c
F:	include/dt-bindings/iio/adc/at91-sama5d2_adc.h
@@ -14280,7 +14280,7 @@ PNI RM3100 IIO DRIVER
M:	Song Qiang <songqiang1304521@gmail.com>
L:	linux-iio@vger.kernel.org
S:	Maintained
F:	Documentation/devicetree/bindings/iio/magnetometer/pni,rm3100.txt
F:	Documentation/devicetree/bindings/iio/magnetometer/pni,rm3100.yaml
F:	drivers/iio/magnetometer/rm3100*
PNP SUPPORT
@@ -15252,7 +15252,7 @@ RENESAS R-CAR GYROADC DRIVER
M:	Marek Vasut <marek.vasut@gmail.com>
L:	linux-iio@vger.kernel.org
S:	Supported
F:	Documentation/devicetree/bindings/iio/adc/renesas,gyroadc.txt
F:	Documentation/devicetree/bindings/iio/adc/renesas,rcar-gyroadc.yaml
F:	drivers/iio/adc/rcar-gyroadc.c
RENESAS R-CAR I2C DRIVERS
@@ -16930,7 +16930,7 @@ M: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
L:	linux-iio@vger.kernel.org
S:	Maintained
W:	http://www.st.com/
F:	Documentation/devicetree/bindings/iio/imu/st_lsm6dsx.txt
F:	Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml
F:	drivers/iio/imu/st_lsm6dsx/
ST MIPID02 CSI-2 TO PARALLEL BRIDGE DRIVER
@@ -16952,7 +16952,7 @@ ST VL53L0X ToF RANGER(I2C) IIO DRIVER
M:	Song Qiang <songqiang1304521@gmail.com>
L:	linux-iio@vger.kernel.org
S:	Maintained
F:	Documentation/devicetree/bindings/iio/proximity/vl53l0x.txt
F:	Documentation/devicetree/bindings/iio/proximity/st,vl53l0x.yaml
F:	drivers/iio/proximity/vl53l0x-i2c.c
STABLE BRANCH
@@ -17688,7 +17688,7 @@ TEXAS INSTRUMENTS' DAC7612 DAC DRIVER
M:	Ricardo Ribalda <ribalda@kernel.org>
L:	linux-iio@vger.kernel.org
S:	Supported
F:	Documentation/devicetree/bindings/iio/dac/ti,dac7612.txt
F:	Documentation/devicetree/bindings/iio/dac/ti,dac7612.yaml
F:	drivers/iio/dac/ti-dac7612.c
TEXAS INSTRUMENTS DMA DRIVERS
+1 −0
Original line number Diff line number Diff line
@@ -72,6 +72,7 @@ source "drivers/iio/accel/Kconfig"
source "drivers/iio/adc/Kconfig"
source "drivers/iio/afe/Kconfig"
source "drivers/iio/amplifiers/Kconfig"
source "drivers/iio/cdc/Kconfig"
source "drivers/iio/chemical/Kconfig"
source "drivers/iio/common/Kconfig"
source "drivers/iio/dac/Kconfig"
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ obj-y += adc/
obj-y += afe/
obj-y += amplifiers/
obj-y += buffer/
obj-y += cdc/
obj-y += chemical/
obj-y += common/
obj-y += dac/
Loading