tmp_suning_uos_patched/drivers/platform/chrome
Guenter Roeck 875a17c3ad platform/chrome: Re-introduce cros_ec_cmd_xfer and use it for ioctls
[ Upstream commit 57b888ca2541785de2fcb90575b378921919b6c0 ]

Commit 413dda8f2c ("platform/chrome: cros_ec_chardev: Use
cros_ec_cmd_xfer_status helper") inadvertendly changed the userspace ABI.
Previously, cros_ec ioctls would only report errors if the EC communication
failed, and otherwise return success and the result of the EC
communication. An EC command execution failure was reported in the EC
response field. The above mentioned commit changed this behavior, and the
ioctl itself would fail. This breaks userspace commands trying to analyze
the EC command execution error since the actual EC command response is no
longer reported to userspace.

Fix the problem by re-introducing the cros_ec_cmd_xfer() helper, and use it
to handle ioctl messages.

Fixes: 413dda8f2c ("platform/chrome: cros_ec_chardev: Use cros_ec_cmd_xfer_status helper")
Cc: Daisuke Nojiri <dnojiri@chromium.org>
Cc: Rob Barnes <robbarnes@google.com>
Cc: Rajat Jain <rajatja@google.com>
Cc: Brian Norris <briannorris@chromium.org>
Cc: Parth Malkan <parthmalkan@google.com>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-09 10:21:14 +02:00
..
wilco_ec platform/chrome: wilco_ec: Provide correct output format to 'h1_gpio' file 2020-04-13 16:36:54 +02:00
chromeos_laptop.c platform/chrome: chromeos_laptop: make I2C API conversion complete 2020-03-27 18:25:32 +01:00
chromeos_pstore.c chrome platform changes for 5.8 2020-06-04 10:54:45 -07:00
chromeos_tbmc.c platform/chrome: chromeos_tbmc: Report wake events 2019-09-12 16:01:35 +02:00
cros_ec_chardev.c platform/chrome: Re-introduce cros_ec_cmd_xfer and use it for ioctls 2022-06-09 10:21:14 +02:00
cros_ec_debugfs.c platform/chrome: cros_ec_debugfs: detach log reader wq from devm 2022-05-25 09:17:54 +02:00
cros_ec_i2c.c platform/chrome: cros_ec_i2c: Appease the kernel-doc deity 2020-05-04 14:01:45 -07:00
cros_ec_ishtp.c platform/chrome: cros_ec_ishtp: Fix a double-unlock issue 2020-06-30 11:41:25 +02:00
cros_ec_lightbar.c platform/chrome: cros_ec_lightbar: Reduce ligthbar get version command 2020-09-04 09:30:04 +02:00
cros_ec_lpc_mec.c
cros_ec_lpc_mec.h
cros_ec_lpc.c platform/chrome: cros_ec: Match implementation with headers 2020-02-03 17:14:50 +01:00
cros_ec_proto.c platform/chrome: Re-introduce cros_ec_cmd_xfer and use it for ioctls 2022-06-09 10:21:14 +02:00
cros_ec_rpmsg.c platform/chrome: cros_ec_rpmsg: Document missing struct parameters 2020-06-30 11:41:25 +02:00
cros_ec_sensorhub_ring.c platform: chrome: Split trace include file 2022-04-08 14:40:38 +02:00
cros_ec_sensorhub_trace.h platform: chrome: Split trace include file 2022-04-08 14:40:38 +02:00
cros_ec_sensorhub.c platform/chrome: cros_ec_sensorhub: Allocate sensorhub resource before claiming sensors 2020-04-29 23:17:45 +02:00
cros_ec_spi.c platform/chrome: cros_ec_spi: Don't overwrite spi::mode 2020-12-30 11:53:45 +01:00
cros_ec_sysfs.c platform/chrome: Use kobj_to_dev() instead of container_of() 2020-09-29 10:08:44 +02:00
cros_ec_trace.c platform/chrome: cros_ec: Add command for regulator control. 2020-06-15 22:40:14 +01:00
cros_ec_trace.h platform: chrome: Split trace include file 2022-04-08 14:40:38 +02:00
cros_ec_typec.c platform/chrome: cros_ec_typec: Check for EC device 2022-04-08 14:40:42 +02:00
cros_ec_vbc.c platform/chrome: Use kobj_to_dev() instead of container_of() 2020-09-29 10:08:44 +02:00
cros_ec.c platform/chrome: cros_ec: fix error handling in cros_ec_register() 2022-06-09 10:21:14 +02:00
cros_ec.h platform/chrome: cros_ec: Match implementation with headers 2020-02-03 17:14:50 +01:00
cros_kbd_led_backlight.c
cros_usbpd_logger.c platform/chrome: cros_usbpd_logger: Add __printf annotation to append_str() 2020-05-04 14:02:01 -07:00
cros_usbpd_notify.c platform/chrome: cros_usbpd_notify: Pull PD_HOST_EVENT status 2020-03-17 14:22:18 -07:00
Kconfig platform/chrome: Kconfig: Remove the transitional MFD_CROS_EC config 2020-09-04 09:30:04 +02:00
Makefile platform: chrome: Split trace include file 2022-04-08 14:40:38 +02:00