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

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

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

Jonathan writes:

First set of IIO new device support, cleanups etc for 5.12

Includes one immutable branch, to support some qcom-vadc patches
going through IIO and thermal.

Late rebase to drop a patch that should go through the hid tree.

New device support:
* adi,ad5766
  - New driver supporting AD5766 and AD5767 16 channel DACs.
* adi,ad7476
  - Support for LTC2314-14 14 bit ADC (trivial to add)
* hid-sensors-hinge
  - New driver including HID custom sensor support.
* invensense,mpu6050
  - Add support for the MPU-6880 (chip info all that is needed)
* memsic,ms5637
  - Add support for ms5803 device after a bunch of rework.
* xilinx-xadc
  - Add support for Ultrascale System Monitor.
* yamaha,yas530
  - New driver for this magnetometer supporting YAS530, YAS532 adn YAS 533.

Dt-binding conversions to yaml
* invensense,mpu3050
* invensense,mpu6050

Cleanups and minor features
* core
  - Copy iio_info.attrs->is_visible along with the attrs themselves.
  - Handle enumerate properties with gaps (i.e. reserved values in
    the middle of otherwise used values).
  - Add an of_iio_channel_get_by_name() function.
* adi,adf4350
  - Drop an unnecessary NULL check.
* amstaos,tsl2583
  - Use DIV_ROUND_CLOSEST in place of open coding.
* avago,apds9960
  - Add MSHW0184 ACPI id seen in the Microsoft Surface Book 3 and Surface
    Pro 7.
* bosch,bmc150_magn
  - Basic regulator support.
* bosch,bme680
  - Use DIV_ROUND_CLOSEST in place of opencoding.
* bosch,bmg160
  - Basic regulator support.
* hid-sensors
  - Add timestamp channels to all sensors types.
* kionix,kxcjk1013
  - Basic regulator support.
* memsic
  - Fix ordering in trivial-device.yaml
* microchip,mcp4725
  - More flexible restrictions in DT binding.
* plantower,pms7003
  - Fix comma that should be semicolon.
* qcom-vadc
  - Refactors to support addition of ADC-TM5 driver
  - Addition of a fixp_linear_interpolate function to support this common
    operation.
* sprd,sc27xx_adc
  - Use DIV_ROUND_CLOSEST in place of opencoding.
* st,ab8500-adc
  - Enable non-hw-conversion as AB505 doesn't support it.
* st,stm32-adc
  - Drop unneeded NULL check.
* st,stm32-dfsdm
  - Drop unneeded NULL check.
* st,vl6180
  - Use DIV_ROUND_CLOSEST in place of opencoding.
* xilinx-xadc
  - Local var for &pdev->dev to avoid excessive repetition.
  - devm_ throughout and drop remove()

* tag 'iio-for-5.12a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (59 commits)
  iio: adc: stm32-dfsdm: Remove redundant null check before clk_disable_unprepare
  iio:pressure:ms5637: add ms5803 support
  iio:common:ms_sensors:ms_sensors_i2c: add support for alternative PROM layout
  iio:common:ms_sensors:ms_sensors_i2c: rework CRC calculation helper
  iio:pressure:ms5637: limit available sample frequencies
  iio:pressure:ms5637: introduce hardware differentiation
  dt-bindings: trivial-devices: reorder memsic devices
  iio: dac: ad5766: add driver support for AD5766
  Documentation/ABI/testing: Add documentation for AD5766 new ABI
  dt-bindings: iio: dac: AD5766 yaml documentation
  iio: hid-sensor-rotation: Add timestamp channel
  iio: hid-sensor-incl-3d: Add timestamp channel
  iio: hid-sensor-magn-3d: Add timestamp channel
  iio: hid-sensor-als: Add timestamp channel
  iio: hid-sensor-gyro-3d: Add timestamp channel
  iio: hid-sensor-accel-3d: Add timestamp channel for gravity sensor
  iio: magnetometer: bmc150: Add rudimentary regulator support
  dt-bindings: iio: magnetometer: bmc150: Document regulator supplies
  iio: Handle enumerated properties with gaps
  iio:Documentation: Add documentation for hinge sensor channels
  ...
parents 3dba1da3 1994a922
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -198,6 +198,7 @@ Description:
		Units after application of scale and offset are m/s^2.

What:		/sys/bus/iio/devices/iio:deviceX/in_angl_raw
What:		/sys/bus/iio/devices/iio:deviceX/in_anglY_raw
KernelVersion:	4.17
Contact:	linux-iio@vger.kernel.org
Description:
@@ -1812,3 +1813,13 @@ Contact: linux-iio@vger.kernel.org
Description:
		Unscaled light intensity according to CIE 1931/DIN 5033 color space.
		Units after application of scale are nano nanowatts per square meter.

What:		/sys/bus/iio/devices/iio:deviceX/in_anglY_label
KernelVersion:	5.12
Contact:	linux-iio@vger.kernel.org
Description:
		Optional symbolic label for channel Y.
		For Intel hid hinge sensor, the label values are:
		hinge, keyboard, screen. It means the three channels
		each correspond respectively to hinge angle, keyboard angle,
		and screen angle.
+31 −0
Original line number Diff line number Diff line
What:		/sys/bus/iio/devices/iio:deviceX/in_voltageY_dither_enable
KernelVersion:	5.12
Contact:	linux-iio@vger.kernel.org
Description:
		Dither enable. Write 1 to enable dither or 0 to disable it.

What:		/sys/bus/iio/devices/iio:deviceX/in_voltageY_dither_invert
KernelVersion:	5.12
Contact:	linux-iio@vger.kernel.org
Description:
		Inverts the dither applied to the selected DAC channel. Dither is not
		inverted by default. Write "1" to invert dither.

What:		/sys/bus/iio/devices/iio:deviceX/in_voltageY_dither_scale_available
KernelVersion:	5.12
Contact:	linux-iio@vger.kernel.org
Description:
		Returns possible scalings available for the current channel.

What:		/sys/bus/iio/devices/iio:deviceX/in_voltageY_dither_scale
KernelVersion:	5.12
Contact:	linux-iio@vger.kernel.org
Description:
		Scales the dither before it is applied to the selected channel.

What:		/sys/bus/iio/devices/iio:deviceX/in_voltageY_dither_source
KernelVersion:	5.12
Contact:	linux-iio@vger.kernel.org
Description:
		Selects dither source applied to the selected channel. Write "0" to
		select N0 source, write "1" to select N1 source.
+3 −0
Original line number Diff line number Diff line
@@ -20,6 +20,9 @@ properties:
  reg:
    maxItems: 1

  vdd-supply: true
  vddio-supply: true

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

+39 −10
Original line number Diff line number Diff line
Xilinx XADC device driver

This binding document describes the bindings for both of them since the
bindings are very similar. The Xilinx XADC is a ADC that can be found in the
series 7 FPGAs from Xilinx. The XADC has a DRP interface for communication.
Currently two different frontends for the DRP interface exist. One that is only
available on the ZYNQ family as a hardmacro in the SoC portion of the ZYNQ. The
other one is available on all series 7 platforms and is a softmacro with a AXI
interface. This binding document describes the bindings for both of them since
the bindings are very similar.
This binding document describes the bindings for the Xilinx 7 Series XADC as well
as the UltraScale/UltraScale+ System Monitor.

The Xilinx XADC is an ADC that can be found in the Series 7 FPGAs from Xilinx.
The XADC has a DRP interface for communication. Currently two different
frontends for the DRP interface exist. One that is only available on the ZYNQ
family as a hardmacro in the SoC portion of the ZYNQ. The other one is available
on all series 7 platforms and is a softmacro with a AXI interface. This binding
document describes the bindings for both of them since the bindings are very
similar.

The Xilinx System Monitor is an ADC that is found in the UltraScale and
UltraScale+ FPGAs from Xilinx. The System Monitor provides a DRP interface for
communication. Xilinx provides a standard IP core that can be used to access the
System Monitor through an AXI interface in the FPGA fabric. This IP core is
called the Xilinx System Management Wizard. This document describes the bindings
for this IP.

Required properties:
	- compatible: Should be one of
@@ -15,11 +24,14 @@ Required properties:
		  configuration interface to interface to the XADC hardmacro.
		* "xlnx,axi-xadc-1.00.a": When using the axi-xadc pcore to
		  interface to the XADC hardmacro.
		* "xlnx,system-management-wiz-1.3": When using the
		  Xilinx System Management Wizard fabric IP core to access the
		  UltraScale and UltraScale+ System Monitor.
	- reg: Address and length of the register set for the device
	- interrupts: Interrupt for the XADC control interface.
	- clocks: When using the ZYNQ this must be the ZYNQ PCAP clock,
	  when using the AXI-XADC pcore this must be the clock that provides the
	  clock to the AXI bus interface of the core.
	  when using the axi-xadc or the axi-system-management-wizard this must be
	  the clock that provides the clock to the AXI bus interface of the core.

Optional properties:
	- xlnx,external-mux:
@@ -110,3 +122,20 @@ Examples:
			};
		};
	};

	adc@80000000 {
		compatible = "xlnx,system-management-wiz-1.3";
		reg = <0x80000000 0x1000>;
		interrupts = <0 81 4>;
		interrupt-parent = <&gic>;
		clocks = <&fpga1_clk>;

		xlnx,channels {
			#address-cells = <1>;
			#size-cells = <0>;
			channel@0 {
				reg = <0>;
				xlnx,bipolar;
			};
		};
	};
+63 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
# Copyright 2020 Analog Devices Inc.
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/dac/adi,ad5766.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices AD5766 DAC device driver

maintainers:
  - Cristian Pop <cristian.pop@analog.com>

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

properties:
  compatible:
    enum:
      - adi,ad5766
      - adi,ad5767

  output-range-microvolts:
    description: Select converter output range.

  reg:
    maxItems: 1

  spi-max-frequency:
    maximum: 1000000

  spi-cpol: true

  reset-gpios:
    description: GPIO spec for the RESET pin. As the line is active low, it
      should be marked GPIO_ACTIVE_LOW.
    maxItems: 1

required:
  - compatible
  - output-range-microvolts
  - reg
  - spi-max-frequency
  - spi-cpol

additionalProperties: false

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

          ad5766@0 {
              compatible = "adi,ad5766";
              output-range-microvolts = <(-5000) 5000>;
              reg = <0>;
              spi-cpol;
              spi-max-frequency = <1000000>;
              reset-gpios = <&gpio 22 0>;
            };
      };
Loading