linux/drivers/platform/chrome
Guenter Roeck 0d080459e8 platform/chrome: cros_ec_proto: Convert EC error codes to Linux error codes
The EC reports a variety of error codes. Most of those, with the exception
of EC_RES_INVALID_VERSION, are converted to -EPROTO. As result, the actual
EC error code gets lost. Introduce cros_ec_map_error() to map EC error
codes to Linux error codes, and use it in cros_ec_cmd_xfer_status() to
report more meaningful errors to the caller. With this change, callers of
cros_ec_cmd_xfer_status() can implement a more distinguished action without
having to rely on the EC error code. At the same time, debugging is improved
in situations where the Linux error code is reported to userspace and/or in
the kernel log.

Cc: Gwendal Grignou <gwendal@chromium.org>
Cc: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Cc: Prashant Malani <pmalani@chromium.org>
Cc: Brian Norris <briannorris@chromium.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
2020-08-24 11:37:34 +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.c platform/chrome: cros_ec: Use cros_ec_cmd_xfer_status helper 2020-03-02 11:04:05 +01:00
cros_ec.h platform/chrome: cros_ec: Match implementation with headers 2020-02-03 17:14:50 +01:00
cros_ec_chardev.c platform/chrome: cros_ec_chardev: Replace zero-length array with flexible-array member 2020-03-22 11:15:18 +01:00
cros_ec_debugfs.c platform/chrome: cros_ec_debugfs: Control uptime information request 2020-06-19 19:16:18 +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 cros_ec_lightbar: Accept more error codes from cros_ec_cmd_xfer_status 2020-08-24 11:37:34 +02:00
cros_ec_lpc.c platform/chrome: cros_ec: Match implementation with headers 2020-02-03 17:14:50 +01:00
cros_ec_lpc_mec.c platform/chrome: cros_ec_lpc_mec: Fix kernel-doc comment first line 2019-06-20 12:00:32 +02:00
cros_ec_lpc_mec.h platform/chrome: cros_ec: Remove cros_ec dependency in lpc_mec 2019-02-11 10:07:40 +01:00
cros_ec_proto.c platform/chrome: cros_ec_proto: Convert EC error codes to Linux error codes 2020-08-24 11:37:34 +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.c platform/chrome: cros_ec_sensorhub: Allocate sensorhub resource before claiming sensors 2020-04-29 23:17:45 +02:00
cros_ec_sensorhub_ring.c platform/chrome: cros_ec_sensorhub: Simplify legacy timestamp spreading 2020-07-31 11:52:43 +02:00
cros_ec_spi.c chrome platform changes for 5.9 2020-08-11 17:28:32 -07:00
cros_ec_sysfs.c platform/chrome: cros_ec_sysfs: Report range of error codes from EC 2020-08-24 11:37:34 +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: cros_ec_proto: Add response tracing 2019-12-10 10:14:02 +01:00
cros_ec_typec.c platform/chrome: cros_ec_typec: Unregister partner on error 2020-07-20 10:39:53 +02:00
cros_ec_vbc.c platform/chrome: cros_ec_vbc: Use cros_ec_cmd_xfer_status helper 2020-03-02 11:04:05 +01:00
cros_kbd_led_backlight.c platform/chrome: cros_kbd_led_backlight: switch to SPDX identifier 2019-02-01 10:13:06 +01:00
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: cros_ec_typec: Add a dependency on USB_ROLE_SWITCH 2020-06-30 15:46:39 +02:00
Makefile platform/chrome: cros_ec_sensorhub: Add FIFO support 2020-03-28 22:04:32 +01:00