linux-sg2042/drivers/platform/chrome
Brian Norris 475b08734e
platform/chrome: straighten out cros_ec_get_{next,host}_event() error codes
cros_ec_get_next_event() is documented to return 0 for success and
negative for errors. It currently returns negative for some errors, and
non-negative (number of bytes received) for success (including some "no
data available" responses as zero). This mostly works out OK, because the
callers were more or less ignoring the documentation, and only treating
positive values as success (and indepdently checking the modification of
'wakeup').

Let's button this up by avoiding pretending to handle event/wakeup
distinctions when no event info was retrieved (i.e., returned 0 bytes).
And fix the documentation of cros_ec_get_host_event() and
cros_ec_get_next_event() to accurately describe their behavior.

Signed-off-by: Brian Norris <briannorris@chromium.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Benson Leung <bleung@chromium.org>
2018-11-13 21:25:14 -08:00
..
Kconfig platform/chrome: Move cros-ec transport drivers to drivers/platform. 2018-07-03 12:40:06 -07:00
Makefile platform/chrome: Move cros-ec transport drivers to drivers/platform. 2018-07-03 12:40:06 -07:00
chromeos_laptop.c platform/chrome: chromeos_laptop: fix touchpad button mapping on Celes 2018-05-29 15:11:04 -07:00
chromeos_pstore.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
chromeos_tbmc.c platform/chrome: chromeos_tbmc - Remove unneeded const 2018-10-09 22:40:12 -07:00
cros_ec_debugfs.c mfd: cros_ec: Don't try to grab log when suspended 2018-05-29 09:10:39 +01:00
cros_ec_i2c.c platform/chrome: Move cros-ec transport drivers to drivers/platform. 2018-07-03 12:40:06 -07:00
cros_ec_lightbar.c platform/chrome: Use to_cros_ec_dev more broadly 2018-05-30 11:53:40 -07:00
cros_ec_lpc.c platform/chrome: Add a new interrupt path for cros_ec_lpc 2018-10-09 21:44:44 -07:00
cros_ec_lpc_mec.c platform/chrome: Move mfd/cros_ec_lpc* includes to drivers/platform. 2018-09-07 15:56:36 +08:00
cros_ec_lpc_mec.h platform/chrome: Move mfd/cros_ec_lpc* includes to drivers/platform. 2018-09-07 15:56:36 +08:00
cros_ec_lpc_reg.c platform/chrome: Move mfd/cros_ec_lpc* includes to drivers/platform. 2018-09-07 15:56:36 +08:00
cros_ec_lpc_reg.h platform/chrome: Move mfd/cros_ec_lpc* includes to drivers/platform. 2018-09-07 15:56:36 +08:00
cros_ec_proto.c platform/chrome: straighten out cros_ec_get_{next,host}_event() error codes 2018-11-13 21:25:14 -08:00
cros_ec_spi.c platform/chrome: Move cros-ec transport drivers to drivers/platform. 2018-07-03 12:40:06 -07:00
cros_ec_sysfs.c platform/chrome: Use to_cros_ec_dev more broadly 2018-05-30 11:53:40 -07:00
cros_ec_vbc.c platform/chrome: Use to_cros_ec_dev more broadly 2018-05-30 11:53:40 -07:00
cros_kbd_led_backlight.c platform/chrome: Add Chrome OS keyboard backlight LEDs support 2016-05-11 11:55:47 -07:00