platform/chrome: cros_ec_lpc: Only check for events on MKBP notifies
Subsystems (2)
PATCH 1/1 platform/chrome: cros_ec_lpc: Only check for events on MKBP notifies
Only check EC for MKBP events when the ACPI notify value indicates the notify is due to an MKBP host event. This reduces unnecessary queries to the EC.
Notify value 0x80 is reserved for devices specific notifies. It is used by many devices to indicate various events. It's only used by cros_ec for MKBP events.
--- drivers/platform/chrome/cros_ec_lpc.c | 2 +- include/linux/platform_data/cros_ec_proto.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-)
drivers/platform/chrome/cros_ec_lpc.c +1 -1
@@ -419,7 +419,7 @@ static void cros_ec_lpc_acpi_notify(acpi_handle device, u32 value, void *data)return ; } - if (ec_dev->mkbp_event_supported) + if (value == ACPI_NOTIFY_CROS_EC_MKBP && ec_dev->mkbp_event_supported) do { ret = cros_ec_get_next_event(ec_dev, NULL, &ec_has_more_events);
include/linux/platform_data/cros_ec_proto.h +5 -0
@@ -48,6 +48,11 @@*/ #define ACPI_NOTIFY_CROS_EC_PANIC 0xB0 +/* +* ACPI notify value for MKBP host event. +*/ +#define ACPI_NOTIFY_CROS_EC_MKBP 0x80 +/* * Command interface between EC and AP, for LPC, I2C and SPI interfaces. */
Signature · 1 line
2.47.1.613.gc27f4b7a9f-goog
Tzung-Bi Shih
maintainerQuoted 9 lines · Rob Barnes
Only check EC for MKBP events when the ACPI notify value indicates the notify is due to an MKBP host event. This reduces unnecessary queries to the EC.
Notify value
0x80is reserved for devices specific notifies. It is used by many devices to indicate various events. It's only used bycros_ecfor MKBP events.[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git for-next
[1/1] platform/chrome: cros_ec_lpc: Only check for events on MKBP notifies
commit: a15ab7a5cc2a17b6a803f624fcf215f4e68d56b6
Thanks!