Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 738b04fb authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull staging/IIO driver updates from Greg KH:
 "Here is the big staging and IIO driver pull request for 4.20-rc1.

  There are lots of things here, we ended up adding more lines than
  removing, thanks to a large influx of Comedi National Instrument
  device support. Someday soon we need to get comedi out of staging...

  Other than the comedi drivers, the "big" things here are:

   - new iio drivers

   - delete dgnc driver (no one used it and no one had the hardware
     anymore)

   - vbox driver updates and fixes

   - erofs fixes

   - tons and tons of tiny checkpatch fixes for almost all staging
     drivers

  All of these have been in linux-next, with the last few happening a
  bit "late" due to them getting stuck on my laptop during travel to the
  Mantainers summit"

* tag 'staging-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (690 commits)
  staging: gasket: Fix sparse "incorrect type in assignment" warnings.
  staging: gasket: remove debug logs for callback invocation
  staging: gasket: remove debug logs in page table mapping calls
  staging: rtl8188eu: core: Use sizeof(*p) instead of sizeof(struct P) for memory allocation
  staging: ks7010: Remove extra blank line
  staging: gasket: Remove extra blank line
  staging: media: davinci_vpfe: Fix spelling mistake in enum
  staging: speakup: Add a pair of braces
  staging: wlan-ng: Replace long int with long
  staging: MAINTAINERS: remove obsolete IPX staging directory
  staging: MAINTAINERS: remove NCP filesystem entry
  staging: rtl8188eu: cleanup comparsions to false
  staging: gasket: Update device virtual address comment
  staging: gasket: sysfs: fix attribute release comment
  staging: gasket: apex: fix sysfs_show
  staging: gasket: page_table: simplify gasket_components_to_dev_address
  staging: gasket: page_table: fix comment in components_to_dev_address
  staging: gasket: page table: fixup error path allocating coherent mem
  staging: gasket: page_table: rearrange gasket_page_table_entry
  staging: gasket: page_table: remove unnecessary PTE status set to free
  ...
parents fe675d4d 4ab7e05d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -199,7 +199,7 @@ Description:

What:		/sys/bus/iio/devices/iio:deviceX/in_positionrelative_x_raw
What:		/sys/bus/iio/devices/iio:deviceX/in_positionrelative_y_raw
KernelVersion:	4.18
KernelVersion:	4.19
Contact:	linux-iio@vger.kernel.org
Description:
		Relative position in direction x or y on a pad (may be
+33 −0
Original line number Diff line number Diff line
Analog Devices ADXL372 3-Axis, +/-(200g) Digital Accelerometer

http://www.analog.com/media/en/technical-documentation/data-sheets/adxl372.pdf

Required properties:
 - compatible : should be "adi,adxl372"
 - reg: the I2C address or SPI chip select number for the device

Required properties for SPI bus usage:
 - spi-max-frequency: Max SPI frequency to use

Optional properties:
 - interrupts: interrupt mapping for IRQ as documented in
   Documentation/devicetree/bindings/interrupt-controller/interrupts.txt

Example for a I2C device node:

	accelerometer@53 {
		compatible = "adi,adxl372";
		reg = <0x53>;
		interrupt-parent = <&gpio>;
		interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
	};

Example for a SPI device node:

	accelerometer@0 {
		compatible = "adi,adxl372";
		reg = <0>;
		spi-max-frequency = <1000000>;
		interrupt-parent = <&gpio>;
		interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
	};
+30 −0
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>;
};
+60 −21
Original line number Diff line number Diff line
Qualcomm's SPMI PMIC voltage ADC
Qualcomm's SPMI PMIC ADC

SPMI PMIC voltage ADC (VADC) provides interface to clients to read
- SPMI PMIC voltage ADC (VADC) provides interface to clients to read
  voltage. The VADC is a 15-bit sigma-delta ADC.
- SPMI PMIC5 voltage ADC (ADC) provides interface to clients to read
  voltage. The VADC is a 16-bit sigma-delta ADC.

VADC node:

@@ -9,11 +11,13 @@ VADC node:
    Usage: required
    Value type: <string>
    Definition: Should contain "qcom,spmi-vadc".
                Should contain "qcom,spmi-adc5" for PMIC5 ADC driver.
                Should contain "qcom,spmi-adc-rev2" for PMIC rev2 ADC driver.

- reg:
    Usage: required
    Value type: <prop-encoded-array>
    Definition: VADC base address and length in the SPMI PMIC register map.
    Definition: VADC base address in the SPMI PMIC register map.

- #address-cells:
    Usage: required
@@ -45,13 +49,26 @@ Channel node properties:
    Definition: ADC channel number.
            See include/dt-bindings/iio/qcom,spmi-vadc.h

- label:
    Usage: required for "qcom,spmi-adc5" and "qcom,spmi-adc-rev2"
    Value type: <empty>
    Definition: ADC input of the platform as seen in the schematics.
            For thermistor inputs connected to generic AMUX or GPIO inputs
            these can vary across platform for the same pins. Hence select
            the platform schematics name for this channel.

- qcom,decimation:
    Usage: optional
    Value type: <u32>
    Definition: This parameter is used to decrease ADC sampling rate.
            Quicker measurements can be made by reducing decimation ratio.
            Valid values are 512, 1024, 2048, 4096.
            If property is not found, default value of 512 will be used.
            - For compatible property "qcom,spmi-vadc", valid values are
              512, 1024, 2048, 4096. If property is not found, default value
              of 512 will be used.
            - For compatible property "qcom,spmi-adc5", valid values are 250, 420
              and 840. If property is not found, default value of 840 is used.
            - For compatible property "qcom,spmi-adc-rev2", valid values are 256,
              512 and 1024. If property is not present, default value is 1024.

- qcom,pre-scaling:
    Usage: optional
@@ -66,21 +83,38 @@ Channel node properties:
- qcom,ratiometric:
    Usage: optional
    Value type: <empty>
    Definition: Channel calibration type. If this property is specified
            VADC will use the VDD reference (1.8V) and GND for channel
            calibration. If property is not found, channel will be
    Definition: Channel calibration type.
            - For compatible property "qcom,spmi-vadc", if this property is
              specified VADC will use the VDD reference (1.8V) and GND for
              channel calibration. If property is not found, channel will be
              calibrated with 0.625V and 1.25V reference channels, also
              known as absolute calibration.
            - For compatible property "qcom,spmi-adc5" and "qcom,spmi-adc-rev2",
              if this property is specified VADC will use the VDD reference
              (1.875V) and GND for channel calibration. If property is not found,
              channel will be calibrated with 0V and 1.25V reference channels,
              also known as absolute calibration.

- qcom,hw-settle-time:
    Usage: optional
    Value type: <u32>
    Definition: Time between AMUX getting configured and the ADC starting
            conversion. Delay = 100us * (value) for value < 11, and
            2ms * (value - 10) otherwise.
            conversion. The 'hw_settle_time' is an index used from valid values
            and programmed in hardware to achieve the hardware settling delay.
            - For compatible property "qcom,spmi-vadc" and "qcom,spmi-adc-rev2",
              Delay = 100us * (hw_settle_time) for hw_settle_time < 11,
              and 2ms * (hw_settle_time - 10) otherwise.
              Valid values are: 0, 100, 200, 300, 400, 500, 600, 700, 800,
            900 us and 1, 2, 4, 6, 8, 10 ms
              900 us and 1, 2, 4, 6, 8, 10 ms.
              If property is not found, channel will use 0us.
            - For compatible property "qcom,spmi-adc5", delay = 15us for
              value 0, 100us * (value) for values < 11,
              and 2ms * (value - 10) otherwise.
              Valid values are: 15, 100, 200, 300, 400, 500, 600, 700, 800,
              900 us and 1, 2, 4, 6, 8, 10 ms
              Certain controller digital versions have valid values of
              15, 100, 200, 300, 400, 500, 600, 700, 1, 2, 4, 8, 16, 32, 64, 128 ms
              If property is not found, channel will use 15us.

- qcom,avg-samples:
    Usage: optional
@@ -89,13 +123,18 @@ Channel node properties:
            Averaging provides the option to obtain a single measurement
            from the ADC that is an average of multiple samples. The value
            selected is 2^(value).
            Valid values are: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512
            - For compatible property "qcom,spmi-vadc", valid values
              are: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512
              If property is not found, 1 sample will be used.
            - For compatible property "qcom,spmi-adc5" and "qcom,spmi-adc-rev2",
              valid values are: 1, 2, 4, 8, 16
              If property is not found, 1 sample will be used.

NOTE:

Following channels, also known as reference point channels, are used for
result calibration and their channel configuration nodes should be defined:
For compatible property "qcom,spmi-vadc" following channels, also known as
reference point channels, are used for result calibration and their channel
configuration nodes should be defined:
VADC_REF_625MV and/or VADC_SPARE1(based on PMIC version) VADC_REF_1250MV,
VADC_GND_REF and VADC_VDD_VADC.

@@ -104,7 +143,7 @@ Example:
	/* VADC node */
	pmic_vadc: vadc@3100 {
		compatible = "qcom,spmi-vadc";
		reg = <0x3100 0x100>;
		reg = <0x3100>;
		interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
		#address-cells = <1>;
		#size-cells = <0>;
+4 −0
Original line number Diff line number Diff line
@@ -12,6 +12,8 @@ Required properties:
- interrupts: The interrupt number for the ADC device.
- #io-channel-cells: Number of cells in an IIO specifier.
- hwlocks: Reference to a phandle of a hwlock provider node.
- nvmem-cells: A phandle to the calibration cells provided by eFuse device.
- nvmem-cell-names: Should be "big_scale_calib", "small_scale_calib".

Example:

@@ -32,5 +34,7 @@ Example:
			interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
			#io-channel-cells = <1>;
			hwlocks = <&hwlock 4>;
			nvmem-cells = <&adc_big_scale>, <&adc_small_scale>;
			nvmem-cell-names = "big_scale_calib", "small_scale_calib";
		};
	};
Loading