Commit 43fbd506 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

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

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

Jonathan writes:

1st set of IIO new device support, features and cleanup for 6.6

New device support
* adi,ad8366
  - Add support for the HMC792 digital attenuator (mostly chip specific data)
* alwinner,sun20i-gpadc
  - New driver for the integrated ADC on a number of allwinner SoCs
    including dt-binding documentation.
* microchip,mcp4728
  - New driver for this quad channel DAC. Includes dt-bindings.
* miramems, da280
  - Add ID for DA217 accelerometer which is compatible with the da280.
* murata,irs-d200
  - New driver for this passive infrared sensor typically used for human
    detection. Includes bindings and a few pieces of new ABI to
    cover a case of needing to count a number of repeats of an event
    before reporting it.
* rohm,bu27008
  - Add initial support for the BU27010 RGB + flickering sensor to this
    driver. Substantial refactoring was needed to enable this.

Features
* adi,admv8818
  - Add mode that bypasses the input and output filters.
* amlogic,meson
  - Support control of the MUX on channel 7, exposed as multiple channels.
  - Support channel labels.
* sensirion,scd4x
  - Add pressure compensation. Controlled via an 'output' pressure channel.
* ti,lmp92040
  - Add IIO buffered supported (read via chrdev).
* vishay,vcnl4000
  - Add proximity interrupt support for vcnl4200.
  - Add proximity integration time control for vcnl4200.
  - Add illuminance integration time control for vcnl4040 and vcnl4200.
  - Add calibration bias, proximity and illuminance event period, and
    oversampling ratio control for vcnl4040 and vncl4200.

Cleanup and minor fixes
* core
  - Tidy up handling of set_trigger_state() callback return values
    to consistently assume no positive return values.
  - Use min() rather than min_t() in a case where types were clearly
    the same.
  - Drop some else statements that follow continue with a loop or
    a returns.
  - White space and comment format cleanup.
  - Use sysfs_match_string() helper to improve readability.
  - Use krealloc_array() to make it explicit a krealloc is for an array
    of structures, not just one.
* tools
  - Tidy up potential overflow in array index.
* tree wide
  - Fix up includes for DT related headers.
  - Drop some error prints in places where as similar error message
    is printed by the function being called.
  - Tidy up handling of return value from platform_get_irq() to no longer
    take into account 0 as a value that might be returned. Similar for
    fwnode_irq_get().
* adi,ad7192
  - Add missing error check and improved debug logging.
  - Use sysfs_emit_at() rather than open coded variant.
* adi,adis16475
  - Drop unused scan element enum entries.
  - Specify that a few more devices support burst32 mode.
* adi,admv1013
  - Enable all required regulators and document as required in the
    dt-binding.
* adi,admv1014
  - Make all regulators required in the dt-binding as the device needs
    them all enabled.
* adi,adxl313
  - Fix wrong enum values being used in the i2c_device_id table.
  - Use i2c_get_match_data() to reduce open coded handling of the
    various id tables.
* allwinner,gpadc
  - Make the kconfig text more specific to make space for separate drivers
    for other Allwinner devices.
* amlogic,meson
  - Drop unused timestamp channels as no buffer support.
  - Various minor reorganizations to enable addition of support channel 7
    MUX.
  - Initialize some default values to account for potential previous user
    since reboot.
* qcom,spmi-adc5
  - Add ADC5_GPIO2_100K_PU support to driver to line up with bindings.
* qcom,spmi-adc7
  - Use predefined channel ID definitions rather than values.
* invensense, common
  - Factor out the timestamp handling to a module used by both mpu6050 and
    icm42600.
* invensense,mpu6050
  - Read as many FIFO elements as possible in one bus access.
* men,s188
  - Drop redundant initialization of driver owner field.
* microchip,mcp4018 and mcp4531
  - Use i2c_get_match_data() instead of open coding. Includes making the
    data format the same for the i2c_device_id and firmware match
    tables.
* semtech,sx9310
  - dt-bindings: Add reference to IIO schema to provide the label property.
* semtech,sx9324
  - dt-bindings: Add reference to IIO schema to provide the label property.
* st,stm32-adc
  - Use devm_platform_get_and_ioremap_resource() instead of open coded
    version.
* st,stm-lptimer-trigger
  - Drop setting platform drvdata as it wasn't then used.
* ti,ads1015
  - Fix wrong dt binding description of ti,datarate for some devices.
* vishay,vcnl4200
  - Move to switch statements for channel type checking to make later
    additions simpler.

* tag 'iio-for-6.6a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (73 commits)
  Documentation: ABI: testing: admv8818: add bypass
  drivers: iio: filter: admv8818: add bypass mode
  iio: light: bd27008: Support BD27010 RGB
  iio: light: bu27008: add chip info
  dt-bindings: iio: ROHM BU27010 RGBC + flickering sensor
  iio: add MCP4728 I2C DAC driver
  dt-bindings: iio: dac: add mcp4728.yaml
  drivers: iio: admv1013: add vcc regulators
  dt-bindings: iio: admv1013: add vcc regulators
  iio: trigger: stm32-lptimer-trigger: remove unneeded platform_set_drvdata()
  iio: adc: men_z188_adc: Remove redundant initialization owner in men_z188_driver
  dt-bindings: iio: admv1014: make all regs required
  iio: cdc: ad7150: relax return value check for IRQ get
  iio: mb1232: relax return value check for IRQ get
  iio: adc: fix the return value handle for platform_get_irq()
  tools: iio: iio_generic_buffer: Fix some integer type and calculation
  iio: potentiometer: mcp4531: Use i2c_get_match_data()
  iio: potentiometer: mcp4018: Use i2c_get_match_data()
  iio: core: Fix issues and style of the comments
  iio: core: Switch to krealloc_array()
  ...
parents f90bebb3 14b7447c
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -2163,3 +2163,19 @@ Contact: linux-iio@vger.kernel.org
Description:
		An example format is 16-bytes, 2-digits-per-byte, HEX-string
		representing the sensor unique ID number.

What:		/sys/.../events/in_proximity_thresh_either_runningperiod
KernelVersion:	6.6
Contact:	linux-iio@vger.kernel.org
Description:
		A running period of time (in seconds) for which
		in_proximity_thresh_either_runningcount amount of conditions
		must occur before an event is generated. If direction is not
		specified then this period applies to both directions.

What:		/sys/.../events/in_proximity_thresh_either_runningcount
KernelVersion:	6.6
Contact:	linux-iio@vger.kernel.org
Description:
		Number of conditions that must occur, during a running
		period, before an event is generated.
+2 −0
Original line number Diff line number Diff line
@@ -7,6 +7,8 @@ Description:

		- auto -> Adjust bandpass filter to track changes in input clock rate.
		- manual -> disable/unregister the clock rate notifier / input clock tracking.
		- bypass -> bypass low pass filter, high pass filter and disable/unregister
								the clock rate notifier

What:		/sys/bus/iio/devices/iio:deviceX/filter_mode
KernelVersion:
+91 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/allwinner,sun20i-d1-gpadc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Allwinner D1 General Purpose ADC

maintainers:
  - Maksim Kiselev <bigunclemax@gmail.com>

properties:
  compatible:
    enum:
      - allwinner,sun20i-d1-gpadc

  "#io-channel-cells":
    const: 1

  "#address-cells":
    const: 1

  "#size-cells":
    const: 0

  clocks:
    maxItems: 1

  interrupts:
    maxItems: 1

  reg:
    maxItems: 1

  resets:
    maxItems: 1

patternProperties:
  "^channel@[0-9a-f]+$":
    $ref: adc.yaml
    type: object
    description:
      Represents the internal channels of the ADC.

    properties:
      reg:
        items:
          minimum: 0
          maximum: 15

    required:
      - reg

    unevaluatedProperties: false

required:
  - "#io-channel-cells"
  - clocks
  - compatible
  - interrupts
  - reg
  - resets

additionalProperties: false

examples:
  - |
    #include <dt-bindings/clock/sun20i-d1-ccu.h>
    #include <dt-bindings/reset/sun20i-d1-ccu.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    gpadc: adc@2009000 {
        compatible = "allwinner,sun20i-d1-gpadc";
        reg = <0x2009000 0x400>;
        clocks = <&ccu CLK_BUS_GPADC>;
        resets = <&ccu RST_BUS_GPADC>;
        interrupts = <73 IRQ_TYPE_LEVEL_HIGH>;
        #io-channel-cells = <1>;

        #address-cells = <1>;
        #size-cells = <0>;

        channel@0 {
            reg = <0>;
        };

        channel@1 {
            reg = <1>;
        };
    };
...
+13 −2
Original line number Diff line number Diff line
@@ -78,9 +78,9 @@ patternProperties:
      ti,datarate:
        $ref: /schemas/types.yaml#/definitions/uint32
        minimum: 0
        maximum: 6
        maximum: 7
        description: |
          Data acquisition rate in samples per second
          Data acquisition rate in samples per second for ADS1015, TLA2024
          0: 128
          1: 250
          2: 490
@@ -88,6 +88,17 @@ patternProperties:
          4: 1600 (default)
          5: 2400
          6: 3300
          7: 3300

          Data acquisition rate in samples per second for ADS1115
          0: 8
          1: 16
          2: 32
          3: 64
          4: 128 (default)
          5: 250
          6: 475
          7: 860

    required:
      - reg
+49 −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/dac/microchip,mcp4728.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Microchip MCP4728 DAC

maintainers:
  - Andrea Collamati <andrea.collamati@gmail.com>

description: |
  MCP4728 is a quad channel, 12-bit voltage output
  Digital-to-Analog Converter with non-volatile
  memory and I2C compatible Serial Interface.
  https://www.microchip.com/en-us/product/mcp4728

properties:
  compatible:
    const: microchip,mcp4728

  reg:
    maxItems: 1

  vdd-supply:
    description: |
      Provides both power and acts as the reference supply on the MCP4728
      when Internal Vref is not selected.

required:
  - compatible
  - reg
  - vdd-supply

additionalProperties: false

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

        dac@60 {
            compatible = "microchip,mcp4728";
            reg = <0x60>;
            vdd-supply = <&vdac_vdd>;
        };
    };
Loading