Commit 090a7d04 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

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

Pull chrome platform updates from Benson Leung:
 "cros-ec:
   - Error code cleanup across cros-ec by Guenter
   - Remove cros_ec_cmd_xfer in favor of cros_ec_cmd_xfer_status

  cros_ec_typec:
   - Landed initial USB4 support in typec connector class driver for
     cros_ec
   - Role switch bugfix on disconnect, and reordering configuration
     steps

  cros_ec_lightbar:
   - Fix buffer outsize and result for get_lightbar_version

  misc:
   - Remove config MFD_CROS_EC, now that transition from MFD is complete
   - Enable KEY_LEFTMETA in new location on arm based cros-ec-keyboard
     keymap"

* tag 'tag-chrome-platform-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux:
  ARM: dts: cros-ec-keyboard: Add alternate keymap for KEY_LEFTMETA
  platform/chrome: Use kobj_to_dev() instead of container_of()
  platform/chrome: cros_ec_proto: Drop cros_ec_cmd_xfer()
  platform/chrome: cros_ec_proto: Update cros_ec_cmd_xfer() call-sites
  platform/chrome: Kconfig: Remove the transitional MFD_CROS_EC config
  platform/chrome: cros_ec_lightbar: Reduce ligthbar get version command
  platform/chrome: cros_ec_trace: Add fields to command traces
  platform/chrome: cros_ec_typec: Re-order connector configuration steps
  platform/chrome: cros_ec_typec: Avoid setting usb role twice during disconnect
  platform/chrome: cros_ec_typec: Send enum values to usb_role_switch_set_role()
  platform/chrome: cros_ec_typec: USB4 support
  pwm: cros-ec: Simplify EC error handling
  platform/chrome: cros_ec_proto: Convert EC error codes to Linux error codes
  platform/input: cros_ec: Replace -ENOTSUPP with -ENOPROTOOPT
  pwm: cros-ec: Accept more error codes from cros_ec_cmd_xfer_status
  platform/chrome: cros_ec_sysfs: Report range of error codes from EC
  cros_ec_lightbar: Accept more error codes from cros_ec_cmd_xfer_status
  iio: cros_ec: Accept -EOPNOTSUPP as 'not supported' error code
parents 4a22709e 3e98fd6d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@
			MATRIX_KEY(0x02, 0x09, KEY_F8)
			MATRIX_KEY(0x02, 0x0a, KEY_YEN)

			MATRIX_KEY(0x03, 0x00, KEY_LEFTMETA)
			MATRIX_KEY(0x03, 0x01, KEY_GRAVE)
			MATRIX_KEY(0x03, 0x02, KEY_F2)
			MATRIX_KEY(0x03, 0x03, KEY_5)
+1 −1
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ static int cros_ec_sensors_read(struct iio_dev *indio_dev,
		st->core.param.sensor_offset.flags = 0;

		ret = cros_ec_motion_send_host_cmd(&st->core, 0);
		if (ret == -EPROTO) {
		if (ret == -EPROTO || ret == -EOPNOTSUPP) {
			/* Reading calibscale is not supported on older EC. */
			*val = 1;
			*val2 = 0;
+1 −1
Original line number Diff line number Diff line
@@ -348,7 +348,7 @@ static int cros_ec_keyb_info(struct cros_ec_device *ec_dev,
	params->event_type = event_type;

	ret = cros_ec_cmd_xfer_status(ec_dev, msg);
	if (ret == -ENOTSUPP) {
	if (ret == -ENOPROTOOPT) {
		/* With older ECs we just return 0 for everything */
		memset(result, 0, result_size);
		ret = 0;
+0 −10
Original line number Diff line number Diff line
@@ -3,16 +3,6 @@
# Platform support for Chrome OS hardware (Chromebooks and Chromeboxes)
#

config MFD_CROS_EC
	tristate "Platform support for Chrome hardware (transitional)"
	select CHROME_PLATFORMS
	select CROS_EC
	select MFD_CROS_EC_DEV
	depends on X86 || ARM || ARM64 || COMPILE_TEST
	help
	  This is a transitional Kconfig option and will be removed after
	  everyone enables the parts individually.

menuconfig CHROME_PLATFORMS
	bool "Platform support for Chrome hardware"
	depends on X86 || ARM || ARM64 || COMPILE_TEST
+6 −6
Original line number Diff line number Diff line
@@ -116,8 +116,10 @@ static int get_lightbar_version(struct cros_ec_dev *ec,

	param = (struct ec_params_lightbar *)msg->data;
	param->cmd = LIGHTBAR_CMD_VERSION;
	msg->outsize = sizeof(param->cmd);
	msg->result = sizeof(resp->version);
	ret = cros_ec_cmd_xfer_status(ec->ec_dev, msg);
	if (ret < 0) {
	if (ret < 0 && ret != -EINVAL) {
		ret = 0;
		goto exit;
	}
@@ -298,11 +300,9 @@ static ssize_t sequence_show(struct device *dev,
		goto exit;

	ret = cros_ec_cmd_xfer_status(ec->ec_dev, msg);
	if (ret == -EPROTO) {
		ret = scnprintf(buf, PAGE_SIZE,
				"ERROR: EC returned %d\n", msg->result);
		goto exit;
	} else if (ret < 0) {
	if (ret < 0) {
		ret = scnprintf(buf, PAGE_SIZE, "XFER / EC ERROR %d / %d\n",
				ret, msg->result);
		goto exit;
	}

Loading