Commit 0ec5a38b authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'tag-chrome-platform-for-v6.2' of...

Merge tag 'tag-chrome-platform-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux

Pull chrome platform updates from Tzung-Bi Shih:
 "New drivers
   - Driver for ChromeOS human presence sensor

  Cleanups:
   - Add missing property in dt-binding example.
   - Update the availability of properties in dt-binding.
   - Separate dt-binding for ChromeOS fingerprint sensor.

  Improvements:
   - Set PROBE_PREFER_ASYNCHRONOUS for some drivers for shortening boot time.

  Fixes:
   - Fix an use-after-free in cros_ec_typec.

  And minor fixes and cleanups"

* tag 'tag-chrome-platform-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux:
  platform/chrome: cros_ec_typec: zero out stale pointers
  platform/chrome: cros_usbpd_notify: Fix error handling in cros_usbpd_notify_init()
  platform/chrome: cros_ec: Convert to i2c's .probe_new()
  platform/chrome: cros_ec_lpc: Force synchronous probe
  platform/chrome: cros_ec_spi: Set PROBE_PREFER_ASYNCHRONOUS
  platform/chrome: cros_ec_lightbar: Set PROBE_PREFER_ASYNCHRONOUS
  platform/chrome: cros_ec_debugfs: Set PROBE_PREFER_ASYNCHRONOUS
  platform/chrome: cros_ec_lpc: Mark PROBE_PREFER_ASYNCHRONOUS
  platform/chrome: cros_ec_lpc: Move mec_init to device probe
  platform/chrome: Use kstrtobool() instead of strtobool()
  platform/chrome: cros_ec_lpc_mec: remove cros_ec_lpc_mec_destroy()
  dt-bindings: cros-ec: Add ChromeOS fingerprint binding
  dt-bindings: cros-ec: Reorganize and enforce property availability
  platform/chrome: cros_hps_i2c: make remove callback return void
  platform/chrome: add a driver for HPS
parents 7a76117f 9a8aadcf
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ examples:
      cros_ec: ec@0 {
        compatible = "google,cros-ec-spi";
        reg = <0>;
        interrupts = <35 0>;

        typec {
          compatible = "google,cros-ec-typec";
+1 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ examples:
      cros_ec: ec@0 {
        compatible = "google,cros-ec-spi";
        reg = <0>;
        interrupts = <15 0>;

        kbd-led-backlight {
          compatible = "google,cros-kbd-led-backlight";
+1 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ examples:
        cros-ec@0 {
            compatible = "google,cros-ec-spi";
            reg = <0>;
            interrupts = <44 0>;

            usbc_extcon0: extcon0 {
                compatible = "google,extcon-usbc-cros-ec";
+1 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ examples:
            compatible = "google,cros-ec-spi";
            reg = <0>;
            spi-max-frequency = <5000000>;
            interrupts = <99 0>;

            i2c-tunnel {
                compatible = "google,cros-ec-i2c-tunnel";
+90 −13
Original line number Diff line number Diff line
@@ -20,19 +20,21 @@ properties:
  compatible:
    oneOf:
      - description:
          For implementations of the EC is connected through I2C.
          For implementations of the EC connected through I2C.
        const: google,cros-ec-i2c
      - description:
          For implementations of the EC is connected through SPI.
          For implementations of the EC connected through SPI.
        const: google,cros-ec-spi
      - description:
          For implementations of the EC is connected through RPMSG.
          For implementations of the FPMCU connected through SPI.
        items:
          - const: google,cros-ec-fp
          - const: google,cros-ec-spi
      - description:
          For implementations of the EC connected through RPMSG.
        const: google,cros-ec-rpmsg

  controller-data:
    description:
      SPI controller data, see bindings/spi/samsung,spi-peripheral-props.yaml
    type: object
  controller-data: true

  google,cros-ec-spi-pre-delay:
    description:
@@ -62,8 +64,7 @@ properties:
      the SCP.
    $ref: "/schemas/types.yaml#/definitions/string"

  spi-max-frequency:
    description: Maximum SPI frequency of the device in Hz.
  spi-max-frequency: true

  reg:
    maxItems: 1
@@ -71,6 +72,15 @@ properties:
  interrupts:
    maxItems: 1

  reset-gpios:
    maxItems: 1

  boot0-gpios:
    maxItems: 1
    description: Assert for bootloader mode.

  vdd-supply: true

  wakeup-source:
    description: Button can wake-up the system.

@@ -155,18 +165,67 @@ allOf:
  - if:
      properties:
        compatible:
          not:
            contains:
            enum:
              - google,cros-ec-i2c
              - google,cros-ec-rpmsg
              const: google,cros-ec-spi
    then:
      properties:
        controller-data: false
        google,cros-ec-spi-pre-delay: false
        google,cros-ec-spi-msg-delay: false
        spi-max-frequency: false
    else:
      $ref: /schemas/spi/spi-peripheral-props.yaml

  - if:
      properties:
        compatible:
          not:
            contains:
              const: google,cros-ec-rpmsg
    then:
      properties:
        mediatek,rpmsg-name: false

      required:
        - reg
        - interrupts

  - if:
      properties:
        compatible:
          contains:
            const: google,cros-ec-fp
    then:
      properties:
        '#address-cells': false
        '#size-cells': false
        typec: false
        ec-pwm: false
        kbd-led-backlight: false
        keyboard-controller: false
        proximity: false
        codecs: false
        cbas: false

      patternProperties:
        "^i2c-tunnel[0-9]*$": false
        "^regulator@[0-9]+$": false
        "^extcon[0-9]*$": false

      # Using additionalProperties: false here and
      # listing true properties doesn't work

      required:
        - reset-gpios
        - boot0-gpios
        - vdd-supply
    else:
      properties:
        reset-gpios: false
        boot0-gpios: false
        vdd-supply: false

additionalProperties: false

examples:
@@ -222,4 +281,22 @@ examples:
            compatible = "google,cros-ec-rpmsg";
        };
    };

  # Example for FPMCU
  - |
    spi0 {
      #address-cells = <0x1>;
      #size-cells = <0x0>;

      ec@0 {
        compatible = "google,cros-ec-fp", "google,cros-ec-spi";
        reg = <0x0>;
        interrupt-parent = <&gpio_controller>;
        interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
        spi-max-frequency = <3000000>;
        reset-gpios = <&gpio_controller 5 GPIO_ACTIVE_LOW>;
        boot0-gpios = <&gpio_controller 10 GPIO_ACTIVE_HIGH>;
        vdd-supply = <&pp3300_fp_mcu>;
      };
    };
...
Loading