Commit 5bb3bf24 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'tag-chrome-platform-for-v5.20' of...

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

Pull chrome platform updates from Tzung-Bi Shih:
 "cros_ec_proto:
   - Leverage Kunit and add Kunit test cases
   - Clean-ups
   - Fix typo

  cros_ec_commands:
   - Fix typo
   - Fix compile errors

  cros_kbd_led_backlight:
   - Support OF match
   - Support EC PWM backend

  cros_ec:
   - Always expose the last resume result to fix sleep hang detection on
     ARM-based chromebooks

  wilco_ec:
   - Fix typo

  cros_ec_typec:
   - Clean-ups
   - Use Type-C framework utilities to manage altmode structs"

* tag 'tag-chrome-platform-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: (59 commits)
  platform/chrome: cros_kunit_util: add default value for `msg->result`
  platform/chrome: merge Kunit utils and test cases
  platform/chrome: cros_kbd_led_backlight: fix build warning
  platform/chrome: cros_ec_proto: add Kunit test for cros_ec_cmd()
  platform/chrome: cros_ec_proto: add Kunit tests for get_sensor_count
  platform/chrome: cros_ec_proto: add Kunit tests for check_features
  platform/chrome: cros_ec_proto: add Kunit tests for get_host_event
  platform/chrome: cros_ec_proto: add Kunit tests for get_next_event
  platform/chrome: cros_ec_proto: add Kunit test for cros_ec_map_error()
  platform/chrome: cros_ec_proto: add Kunit tests for cmd_xfer_status
  platform/chrome: cros_ec_proto: return -EPROTO if empty payload
  platform/chrome: cros_ec_proto: add Kunit test for empty payload
  platform/chrome: cros_ec_proto: return -EAGAIN when retries timed out
  platform/chrome: cros_ec_proto: change Kunit expectation when timed out
  platform/chrome: cros_ec_proto: separate cros_ec_wait_until_complete()
  platform/chrome: cros_ec_proto: separate cros_ec_xfer_command()
  platform/chrome: cros_ec_proto: add Kunit tests for cros_ec_send_command()
  platform/chrome: cros_ec_proto: add Kunit tests for cros_ec_cmd_xfer()
  platform/chrome: cros_ec_proto: add "cros_ec_" prefix to send_command()
  platform/chrome: cros_ec_typec: Register port altmodes
  ...
parents da8d07af afef1e1a
Loading
Loading
Loading
Loading
+35 −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/chrome/google,cros-kbd-led-backlight.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: ChromeOS keyboard backlight LED driver.

maintainers:
  - Tzung-Bi Shih <tzungbi@kernel.org>

properties:
  compatible:
    const: google,cros-kbd-led-backlight

required:
  - compatible

additionalProperties: false

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

      cros_ec: ec@0 {
        compatible = "google,cros-ec-spi";
        reg = <0>;

        kbd-led-backlight {
          compatible = "google,cros-kbd-led-backlight";
        };
      };
    };
+3 −0
Original line number Diff line number Diff line
@@ -90,6 +90,9 @@ properties:
  pwm:
    $ref: "/schemas/pwm/google,cros-ec-pwm.yaml#"

  kbd-led-backlight:
    $ref: "/schemas/chrome/google,cros-kbd-led-backlight.yaml#"

  keyboard-controller:
    $ref: "/schemas/input/google,cros-ec-keyb.yaml#"

+2 −2
Original line number Diff line number Diff line
@@ -250,7 +250,7 @@ static int ec_device_probe(struct platform_device *pdev)
	 * The PCHG device cannot be detected by sending EC_FEATURE_GET_CMD, but
	 * it can be detected by querying the number of peripheral chargers.
	 */
	retval = cros_ec_command(ec->ec_dev, 0, EC_CMD_PCHG_COUNT, NULL, 0,
	retval = cros_ec_cmd(ec->ec_dev, 0, EC_CMD_PCHG_COUNT, NULL, 0,
			     &pchg_count, sizeof(pchg_count));
	if (retval >= 0 && pchg_count.port_count) {
		retval = mfd_add_hotplug_devices(ec->dev,
+10 −1
Original line number Diff line number Diff line
@@ -139,7 +139,7 @@ config CROS_EC_PROTO

config CROS_KBD_LED_BACKLIGHT
	tristate "Backlight LED support for Chrome OS keyboards"
	depends on LEDS_CLASS && ACPI
	depends on LEDS_CLASS && (ACPI || CROS_EC)
	help
	  This option enables support for the keyboard backlight LEDs on
	  select Chrome OS systems.
@@ -267,4 +267,13 @@ config CHROMEOS_PRIVACY_SCREEN

source "drivers/platform/chrome/wilco_ec/Kconfig"

# Kunit test cases
config CROS_KUNIT
	tristate "Kunit tests for ChromeOS" if !KUNIT_ALL_TESTS
	depends on KUNIT && CROS_EC
	default KUNIT_ALL_TESTS
	select CROS_EC_PROTO
	help
	  ChromeOS Kunit tests.

endif # CHROMEOS_PLATFORMS
+5 −0
Original line number Diff line number Diff line
@@ -30,3 +30,8 @@ obj-$(CONFIG_CROS_USBPD_LOGGER) += cros_usbpd_logger.o
obj-$(CONFIG_CROS_USBPD_NOTIFY)		+= cros_usbpd_notify.o

obj-$(CONFIG_WILCO_EC)			+= wilco_ec/

# Kunit test cases
obj-$(CONFIG_CROS_KUNIT)		+= cros_kunit.o
cros_kunit-objs				:= cros_kunit_util.o
cros_kunit-objs				+= cros_ec_proto_test.o
Loading