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

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

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

Pull chrome platform updates from Tzung-Bi Shih:
 "New drivers:
   - cros_ec_uart for ChromeOS EC protocol over UART
   - cros_typec_vdm for USB PD Vendor Defined Message

  Improvements:
   - Preserve logs as much as possible when EC panics
   - Shutdown to refrain from potential HW damages when EC panics

  Fixes:
   - Fix DP_PORT_VDO to include DP_CAP_RECEPTACLE
   - Fix a lockdep false positive

  Cleanups:
   - Use sysfs_emit*() instead of scnprintf()
   - Use asm instead of asm-generic for unaligned.h

  Misc:
   - Rename module name from cros_ec_typec to cros-ec-typec
   - Minor fixes"

* tag 'tag-chrome-platform-for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: (34 commits)
  platform/chrome: cros_ec_typec: Fix spelling mistake
  platform/chrome: cros_typec_vdm: Add Attention support
  platform/chrome: cros_ec: Add VDM attention headers
  platform/chrome: cros_typec_vdm: Fix VDO copy
  platform/chrome: cros_ec_typec: allow deferred probe of switch handles
  platform/chrome: cros_ec_proto: remove big stub objects from stack
  platform/chrome: cros_ec_uart: fix negative type promoted to high
  platform/chrome: cros_ec: Use per-device lockdep key
  platform/chrome: fix kernel-doc warnings for cros_ec_command
  platform/chrome: fix kernel-doc warning for last_resume_result
  platform/chrome: fix kernel-doc warning for suspend_timeout_ms
  platform/chrome: fix kernel-doc warnings for panic notifier
  platform/chrome: cros_ec_lpc: initialize the buf variable
  platform/chrome: cros_ec: Fix panic notifier registration
  platform/chrome: cros_typec_switch: Check for retimer flag
  platform/chrome: cros_typec_switch: Use fwnode* prop check
  platform/chrome: cros_typec_vdm: Add VDM send support
  platform/chrome: cros_typec_vdm: Add VDM reply support
  platform/chrome: cros_ec_typec: Add initial VDM support
  platform/chrome: cros_ec_typec: Alter module name with hyphens
  ...
parents 239451e9 b0d8a677
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -4823,6 +4823,13 @@ S: Maintained
F:	Documentation/devicetree/bindings/sound/google,cros-ec-codec.yaml
F:	sound/soc/codecs/cros_ec_codec.*
CHROMEOS EC UART DRIVER
M:	Bhanu Prakash Maiya <bhanumaiya@chromium.org>
R:	Benson Leung <bleung@chromium.org>
R:	Tzung-Bi Shih <tzungbi@kernel.org>
S:	Maintained
F:	drivers/platform/chrome/cros_ec_uart.c
CHROMEOS EC SUBDRIVERS
M:	Benson Leung <bleung@chromium.org>
R:	Guenter Roeck <groeck@chromium.org>
@@ -4836,8 +4843,9 @@ CHROMEOS EC USB TYPE-C DRIVER
M:	Prashant Malani <pmalani@chromium.org>
L:	chrome-platform@lists.linux.dev
S:	Maintained
F:	drivers/platform/chrome/cros_ec_typec.c
F:	drivers/platform/chrome/cros_ec_typec.*
F:	drivers/platform/chrome/cros_typec_switch.c
F:	drivers/platform/chrome/cros_typec_vdm.*
CHROMEOS EC USB PD NOTIFY DRIVER
M:	Prashant Malani <pmalani@chromium.org>
+0 −5
Original line number Diff line number Diff line
@@ -64,11 +64,6 @@ static const struct cros_feature_to_name cros_mcu_devices[] = {
		.name	= CROS_EC_DEV_SCP_NAME,
		.desc	= "System Control Processor",
	},
	{
		.id	= EC_FEATURE_SCP_C1,
		.name	= CROS_EC_DEV_SCP_C1_NAME,
		.desc	= "System Control Processor 2nd Core",
	},
	{
		.id	= EC_FEATURE_TOUCHPAD,
		.name	= CROS_EC_DEV_TP_NAME,
+11 −1
Original line number Diff line number Diff line
@@ -119,6 +119,16 @@ config CROS_EC_SPI
	  response time cannot be guaranteed, we support ignoring
	  'pre-amble' bytes before the response actually starts.

config CROS_EC_UART
	tristate "ChromeOS Embedded Controller (UART)"
	depends on CROS_EC && ACPI && SERIAL_DEV_BUS
	help
	  If you say Y here, you get support for talking to the ChromeOS EC
	  through a UART, using a byte-level protocol.

	  To compile this driver as a module, choose M here: the
	  module will be called cros_ec_uart.

config CROS_EC_LPC
	tristate "ChromeOS Embedded Controller (LPC)"
	depends on CROS_EC && ACPI && (X86 || COMPILE_TEST)
@@ -226,7 +236,7 @@ config CROS_EC_TYPEC
	  information from the Chrome OS EC.

	  To compile this driver as a module, choose M here: the module will be
	  called cros_ec_typec.
	  called cros-ec-typec.

config CROS_HPS_I2C
	tristate "ChromeOS HPS device"
+3 −1
Original line number Diff line number Diff line
@@ -15,8 +15,10 @@ obj-$(CONFIG_CROS_EC_ISHTP) += cros_ec_ishtp.o
obj-$(CONFIG_CROS_TYPEC_SWITCH)		+= cros_typec_switch.o
obj-$(CONFIG_CROS_EC_RPMSG)		+= cros_ec_rpmsg.o
obj-$(CONFIG_CROS_EC_SPI)		+= cros_ec_spi.o
obj-$(CONFIG_CROS_EC_UART)		+= cros_ec_uart.o
cros_ec_lpcs-objs			:= cros_ec_lpc.o cros_ec_lpc_mec.o
obj-$(CONFIG_CROS_EC_TYPEC)		+= cros_ec_typec.o
cros-ec-typec-objs			:= cros_ec_typec.o cros_typec_vdm.o
obj-$(CONFIG_CROS_EC_TYPEC)		+= cros-ec-typec.o
obj-$(CONFIG_CROS_EC_LPC)		+= cros_ec_lpcs.o
obj-$(CONFIG_CROS_EC_PROTO)		+= cros_ec_proto.o cros_ec_trace.o
obj-$(CONFIG_CROS_KBD_LED_BACKLIGHT)	+= cros_kbd_led_backlight.o
+12 −3
Original line number Diff line number Diff line
@@ -182,6 +182,7 @@ int cros_ec_register(struct cros_ec_device *ec_dev)
	int err = 0;

	BLOCKING_INIT_NOTIFIER_HEAD(&ec_dev->event_notifier);
	BLOCKING_INIT_NOTIFIER_HEAD(&ec_dev->panic_notifier);

	ec_dev->max_request = sizeof(struct ec_params_hello);
	ec_dev->max_response = sizeof(struct ec_response_get_protocol_info);
@@ -198,12 +199,14 @@ int cros_ec_register(struct cros_ec_device *ec_dev)
	if (!ec_dev->dout)
		return -ENOMEM;

	lockdep_register_key(&ec_dev->lockdep_key);
	mutex_init(&ec_dev->lock);
	lockdep_set_class(&ec_dev->lock, &ec_dev->lockdep_key);

	err = cros_ec_query_all(ec_dev);
	if (err) {
		dev_err(dev, "Cannot identify the EC: error %d\n", err);
		return err;
		goto destroy_mutex;
	}

	if (ec_dev->irq > 0) {
@@ -215,7 +218,7 @@ int cros_ec_register(struct cros_ec_device *ec_dev)
		if (err) {
			dev_err(dev, "Failed to request IRQ %d: %d\n",
				ec_dev->irq, err);
			return err;
			goto destroy_mutex;
		}
	}

@@ -226,7 +229,8 @@ int cros_ec_register(struct cros_ec_device *ec_dev)
	if (IS_ERR(ec_dev->ec)) {
		dev_err(ec_dev->dev,
			"Failed to create CrOS EC platform device\n");
		return PTR_ERR(ec_dev->ec);
		err = PTR_ERR(ec_dev->ec);
		goto destroy_mutex;
	}

	if (ec_dev->max_passthru) {
@@ -292,6 +296,9 @@ int cros_ec_register(struct cros_ec_device *ec_dev)
exit:
	platform_device_unregister(ec_dev->ec);
	platform_device_unregister(ec_dev->pd);
destroy_mutex:
	mutex_destroy(&ec_dev->lock);
	lockdep_unregister_key(&ec_dev->lockdep_key);
	return err;
}
EXPORT_SYMBOL(cros_ec_register);
@@ -309,6 +316,8 @@ void cros_ec_unregister(struct cros_ec_device *ec_dev)
	if (ec_dev->pd)
		platform_device_unregister(ec_dev->pd);
	platform_device_unregister(ec_dev->ec);
	mutex_destroy(&ec_dev->lock);
	lockdep_unregister_key(&ec_dev->lockdep_key);
}
EXPORT_SYMBOL(cros_ec_unregister);

Loading