Commit 2eff01ee authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull char/misc/IIO/whatever driver subsystem updates from Greg KH:
 "Here is the 'big and hairy' char/misc/iio and other small driver
  subsystem updates for 6.13-rc1.

  Loads of things in here, and even a fun merge conflict!

   - rust misc driver bindings and other rust changes to make misc
     drivers actually possible.

     I think this is the tipping point, expect to see way more rust
     drivers going forward now that these bindings are present. Next
     merge window hopefully we will have pci and platform drivers
     working, which will fully enable almost all driver subsystems to
     start accepting (or at least getting) rust drivers.

     This is the end result of a lot of work from a lot of people,
     congrats to all of them for getting this far, you've proved many of
     us wrong in the best way possible, working code :)

   - IIO driver updates, too many to list individually, that subsystem
     keeps growing and growing...

   - Interconnect driver updates

   - nvmem driver updates

   - pwm driver updates

   - platform_driver::remove() fixups, loads of them

   - counter driver updates

   - misc driver updates (keba?)

   - binder driver updates and fixes

   - loads of other small char/misc/etc driver updates and additions,
     full details in the shortlog.

  All of these have been in linux-next for a while, with no other
  reported issues other than that merge conflict"

* tag 'char-misc-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (401 commits)
  mei: vsc: Fix typo "maintstepping" -> "mainstepping"
  firmware: Switch back to struct platform_driver::remove()
  misc: isl29020: Fix the wrong format specifier
  scripts/tags.sh: Don't tag usages of DEFINE_MUTEX
  fpga: Switch back to struct platform_driver::remove()
  mei: vsc: Improve error logging in vsc_identify_silicon()
  mei: vsc: Do not re-enable interrupt from vsc_tp_reset()
  dt-bindings: spmi: qcom,x1e80100-spmi-pmic-arb: Add SAR2130P compatible
  dt-bindings: spmi: spmi-mtk-pmif: Add compatible for MT8188
  spmi: pmic-arb: fix return path in for_each_available_child_of_node()
  iio: Move __private marking before struct element priv in struct iio_dev
  docs: iio: ad7380: add adaq4370-4 and adaq4380-4
  iio: adc: ad7380: add support for adaq4370-4 and adaq4380-4
  iio: adc: ad7380: use local dev variable to shorten long lines
  iio: adc: ad7380: fix oversampling formula
  dt-bindings: iio: adc: ad7380: add adaq4370-4 and adaq4380-4 compatible parts
  bus: mhi: host: pci_generic: Use pcim_iomap_region() to request and map MHI BAR
  bus: mhi: host: Switch trace_mhi_gen_tre fields to native endian
  misc: atmel-ssc: Use of_property_present() for non-boolean properties
  misc: keba: Add hardware dependency
  ...
parents 55cb93fd 5a6c3525
Loading
Loading
Loading
Loading
+32 −0
Original line number Diff line number Diff line
@@ -2268,6 +2268,30 @@ Description:
		An example format is 16-bytes, 2-digits-per-byte, HEX-string
		representing the sensor unique ID number.

What:		/sys/bus/iio/devices/iio:deviceX/filter_type_available
What:		/sys/bus/iio/devices/iio:deviceX/in_voltage-voltage_filter_mode_available
KernelVersion:	6.1
Contact:	linux-iio@vger.kernel.org
Description:
		Reading returns a list with the possible filter modes. Options
		for the attribute:

		* "sinc3" - The digital sinc3 filter. Moderate 1st
		  conversion time. Good noise performance.
		* "sinc4" - Sinc 4. Excellent noise performance. Long
		  1st conversion time.
		* "sinc5" - The digital sinc5 filter. Excellent noise
		  performance
		* "sinc4+sinc1" - Sinc4 + averaging by 8. Low 1st conversion
		  time.
		* "sinc3+rej60" - Sinc3 + 60Hz rejection.
		* "sinc3+sinc1" - Sinc3 + averaging by 8. Low 1st conversion
		  time.
		* "sinc3+pf1" - Sinc3 + device specific Post Filter 1.
		* "sinc3+pf2" - Sinc3 + device specific Post Filter 2.
		* "sinc3+pf3" - Sinc3 + device specific Post Filter 3.
		* "sinc3+pf4" - Sinc3 + device specific Post Filter 4.

What:		/sys/.../events/in_proximity_thresh_either_runningperiod
KernelVersion:	6.6
Contact:	linux-iio@vger.kernel.org
@@ -2339,3 +2363,11 @@ KernelVersion: 6.10
Contact:	linux-iio@vger.kernel.org
Description:
		The value of current sense resistor in Ohms.

What:		/sys/.../iio:deviceX/in_attention_input
KernelVersion:	6.13
Contact:	linux-iio@vger.kernel.org
Description:
		Value representing the user's attention to the system expressed
		in units as percentage. This usually means if the user is
		looking at the screen or not.
+0 −46
Original line number Diff line number Diff line
What:		/sys/bus/iio/devices/iio:deviceX/in_voltage-voltage_filter_mode_available
KernelVersion:  6.2
Contact:	linux-iio@vger.kernel.org
Description:
		Reading returns a list with the possible filter modes.

		  * "sinc4"       - Sinc 4. Excellent noise performance. Long
                    1st conversion time. No natural 50/60Hz rejection.

		  * "sinc4+sinc1" - Sinc4 + averaging by 8. Low 1st conversion
		    time.

		  * "sinc3"	      - Sinc3. Moderate 1st conversion time.
		    Good noise performance.

		  * "sinc3+rej60" - Sinc3 + 60Hz rejection. At a sampling
		    frequency of 50Hz, achieves simultaneous 50Hz and 60Hz
		    rejection.

		  * "sinc3+sinc1" - Sinc3 + averaging by 8. Low 1st conversion
		    time. Best used with a sampling frequency of at least
		    216.19Hz.

		  * "sinc3+pf1"   - Sinc3 + Post Filter 1. 53dB rejection @
		    50Hz, 58dB rejection @ 60Hz.

		  * "sinc3+pf2"   - Sinc3 + Post Filter 2. 70dB rejection @
		    50Hz, 70dB rejection @ 60Hz.

		  * "sinc3+pf3"   - Sinc3 + Post Filter 3. 99dB rejection @
		    50Hz, 103dB rejection @ 60Hz.

		  * "sinc3+pf4"   - Sinc3 + Post Filter 4. 103dB rejection @
		    50Hz, 109dB rejection @ 60Hz.

What:		/sys/bus/iio/devices/iio:deviceX/in_voltageY-voltageZ_filter_mode
KernelVersion:  6.2
Contact:	linux-iio@vger.kernel.org
Description:
		Set the filter mode of the differential channel. When the filter
		mode changes, the in_voltageY-voltageZ_sampling_frequency and
		in_voltageY-voltageZ_sampling_frequency_available attributes
		might also change to accommodate the new filter mode.
		If the current sampling frequency is out of range for the new
		filter mode, the sampling frequency will be changed to the
		closest valid one.
+4 −0
Original line number Diff line number Diff line
@@ -37,6 +37,10 @@ properties:
      to both the positive and negative inputs of a differential ADC.
      The first value specifies the positive input pin, the second
      specifies the negative input pin.
      There are also some ADCs, where the differential channel has dedicated
      positive and negative inputs which can be used to measure differential
      voltage levels. For those setups, this property can be configured with
      the 'reg' property for both inputs (i.e. diff-channels = <reg reg>).

  single-channel:
    $ref: /schemas/types.yaml#/definitions/uint32
+3 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ description: |
  Datasheets for supported chips:
    https://www.analog.com/media/en/technical-documentation/data-sheets/AD4111.pdf
    https://www.analog.com/media/en/technical-documentation/data-sheets/AD4112.pdf
    <AD4113: not released yet>
    https://www.analog.com/media/en/technical-documentation/data-sheets/AD4114.pdf
    https://www.analog.com/media/en/technical-documentation/data-sheets/AD4115.pdf
    https://www.analog.com/media/en/technical-documentation/data-sheets/AD4116.pdf
@@ -44,6 +45,7 @@ properties:
    enum:
      - adi,ad4111
      - adi,ad4112
      - adi,ad4113
      - adi,ad4114
      - adi,ad4115
      - adi,ad4116
@@ -331,6 +333,7 @@ allOf:
            enum:
              - adi,ad4111
              - adi,ad4112
              - adi,ad4113
              - adi,ad4114
              - adi,ad4115
              - adi,ad4116
+120 −0
Original line number Diff line number Diff line
@@ -25,6 +25,8 @@ description: |
  * https://www.analog.com/en/products/ad7386-4.html
  * https://www.analog.com/en/products/ad7387-4.html
  * https://www.analog.com/en/products/ad7388-4.html
  * https://www.analog.com/en/products/adaq4370-4.html
  * https://www.analog.com/en/products/adaq4380-4.html


$ref: /schemas/spi/spi-peripheral-props.yaml#
@@ -46,6 +48,8 @@ properties:
      - adi,ad7386-4
      - adi,ad7387-4
      - adi,ad7388-4
      - adi,adaq4370-4
      - adi,adaq4380-4

  reg:
    maxItems: 1
@@ -70,6 +74,20 @@ properties:
  refin-supply:
    description:
      A 2.5V to 3.3V supply for external reference voltage, for ad7380-4 only.
      For adaq devices, a 5V supply voltage. A 3.3V internal reference is
      derived from it. Connect to vs-p-supply for normal operation.

  vs-p-supply:
    description:
      Amplifiers positive supply.

  vs-n-supply:
    description:
      Amplifiers negative supply.

  ldo-supply:
    description:
      LDO supply. Connect to vs-p-supply or a 3.6 to 5.5 V supply.

  aina-supply:
    description:
@@ -97,12 +115,45 @@ properties:
      specify the ALERT interrupt.
    maxItems: 1

  "#address-cells":
    const: 1

  "#size-cells":
    const: 0

required:
  - compatible
  - reg
  - vcc-supply
  - vlogic-supply

patternProperties:
  "^channel@[0-3]$":
    $ref: adc.yaml
    type: object

    properties:
      reg:
        description:
          The channel number. From 0 to 3 corresponding to channels A,B,C,D
        minimum: 0
        maximum: 3

      adi,gain-milli:
        description:
          The hardware gain applied to the ADC input (in milli units).
          If not present, default to 1000 (no actual gain applied).
          Refer to the typical connection diagrams section of the datasheet for
          pin wiring.
        $ref: /schemas/types.yaml#/definitions/uint16
        enum: [300, 600, 1000, 1600]
        default: 1000

    required:
      - reg

    additionalProperties: false

unevaluatedProperties: false

allOf:
@@ -140,6 +191,7 @@ allOf:
        aind-supply: false

  # ad7380-4 uses refin-supply as external reference.
  # adaq devices use internal reference only, derived from refin-supply
  # All other chips from ad738x family use refio as optional external reference.
  # When refio-supply is omitted, internal reference is used.
  - if:
@@ -147,6 +199,8 @@ allOf:
        compatible:
          enum:
            - adi,ad7380-4
            - adi,adaq4370-4
            - adi,adaq4380-4
    then:
      properties:
        refio-supply: false
@@ -156,6 +210,27 @@ allOf:
      properties:
        refin-supply: false

  # adaq devices need more supplies and using channel to declare gain property
  # only applies to adaq devices
  - if:
      properties:
        compatible:
          enum:
            - adi,adaq4370-4
            - adi,adaq4380-4
    then:
      required:
        - vs-p-supply
        - vs-n-supply
        - ldo-supply
    else:
      properties:
        vs-p-supply: false
        vs-n-supply: false
        ldo-supply: false
      patternProperties:
        "^channel@[0-3]$": false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
@@ -180,3 +255,48 @@ examples:
            refio-supply = <&supply_2_5V>;
        };
    };

  - |
    #include <dt-bindings/interrupt-controller/irq.h>

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

        adc@0 {
            compatible = "adi,adaq4380-4";
            reg = <0>;

            spi-cpol;
            spi-cpha;
            spi-max-frequency = <80000000>;

            interrupts = <27 IRQ_TYPE_EDGE_FALLING>;
            interrupt-parent = <&gpio0>;

            vcc-supply = <&supply_3_3V>;
            vlogic-supply = <&supply_3_3V>;
            refin-supply = <&supply_5V>;
            vs-p-supply = <&supply_5V>;
            vs-n-supply = <&supply_0V>;
            ldo-supply = <&supply_5V>;

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

            channel@0 {
                reg = <0>;
                adi,gain-milli = /bits/ 16 <300>;
            };

            channel@2 {
                reg = <2>;
                adi,gain-milli = /bits/ 16 <600>;
            };

            channel@3 {
                reg = <3>;
                adi,gain-milli = /bits/ 16 <1000>;
            };
        };
    };
Loading