aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/platform/chrome/cros_ec_proto.c4
-rw-r--r--include/linux/mfd/cros_ec.h6
2 files changed, 6 insertions, 4 deletions
diff --git a/drivers/platform/chrome/cros_ec_proto.c b/drivers/platform/chrome/cros_ec_proto.c
index b6fd4838f60f..fff67b389c87 100644
--- a/drivers/platform/chrome/cros_ec_proto.c
+++ b/drivers/platform/chrome/cros_ec_proto.c
@@ -580,7 +580,7 @@ int cros_ec_get_next_event(struct cros_ec_device *ec_dev, bool *wake_event)
580 580
581 if (!ec_dev->mkbp_event_supported) { 581 if (!ec_dev->mkbp_event_supported) {
582 ret = get_keyboard_state_event(ec_dev); 582 ret = get_keyboard_state_event(ec_dev);
583 if (ret < 0) 583 if (ret <= 0)
584 return ret; 584 return ret;
585 585
586 if (wake_event) 586 if (wake_event)
@@ -590,7 +590,7 @@ int cros_ec_get_next_event(struct cros_ec_device *ec_dev, bool *wake_event)
590 } 590 }
591 591
592 ret = get_next_event(ec_dev); 592 ret = get_next_event(ec_dev);
593 if (ret < 0) 593 if (ret <= 0)
594 return ret; 594 return ret;
595 595
596 if (wake_event) { 596 if (wake_event) {
diff --git a/include/linux/mfd/cros_ec.h b/include/linux/mfd/cros_ec.h
index e44e3ec8a9c7..de8b588c8776 100644
--- a/include/linux/mfd/cros_ec.h
+++ b/include/linux/mfd/cros_ec.h
@@ -317,7 +317,9 @@ int cros_ec_query_all(struct cros_ec_device *ec_dev);
317 * @wake_event: Pointer to a bool set to true upon return if the event might be 317 * @wake_event: Pointer to a bool set to true upon return if the event might be
318 * treated as a wake event. Ignored if null. 318 * treated as a wake event. Ignored if null.
319 * 319 *
320 * Return: 0 on success or negative error code. 320 * Return: negative error code on errors; 0 for no data; or else number of
321 * bytes received (i.e., an event was retrieved successfully). Event types are
322 * written out to @ec_dev->event_data.event_type on success.
321 */ 323 */
322int cros_ec_get_next_event(struct cros_ec_device *ec_dev, bool *wake_event); 324int cros_ec_get_next_event(struct cros_ec_device *ec_dev, bool *wake_event);
323 325
@@ -329,7 +331,7 @@ int cros_ec_get_next_event(struct cros_ec_device *ec_dev, bool *wake_event);
329 * events raised and call the functions in the ec notifier. This function 331 * events raised and call the functions in the ec notifier. This function
330 * is a helper to know which events are raised. 332 * is a helper to know which events are raised.
331 * 333 *
332 * Return: 0 on success or negative error code. 334 * Return: 0 on error or non-zero bitmask of one or more EC_HOST_EVENT_*.
333 */ 335 */
334u32 cros_ec_get_host_event(struct cros_ec_device *ec_dev); 336u32 cros_ec_get_host_event(struct cros_ec_device *ec_dev);
335 337