diff options
-rw-r--r-- | board/coachz/board.h | 1 | ||||
-rw-r--r-- | common/peripheral_charger.c | 7 | ||||
-rw-r--r-- | include/ec_commands.h | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/board/coachz/board.h b/board/coachz/board.h index d94c267f34..76480b892b 100644 --- a/board/coachz/board.h +++ b/board/coachz/board.h @@ -17,6 +17,7 @@ #define CONFIG_CMD_GPIO_EXTENDED #define CONFIG_CMD_POWERINDEBUG #define CONFIG_I2C_DEBUG +#define CONFIG_DEVICE_EVENT /* Internal SPI flash on NPCX7 */ #define CONFIG_FLASH_SIZE (512 * 1024) /* 512KB internal spi flash */ diff --git a/common/peripheral_charger.c b/common/peripheral_charger.c index 2faa315253..eeb2a4cf80 100644 --- a/common/peripheral_charger.c +++ b/common/peripheral_charger.c @@ -5,6 +5,7 @@ #include "atomic.h" #include "common.h" +#include "device_event.h" #include "hooks.h" #include "host_command.h" #include "peripheral_charger.h" @@ -320,6 +321,12 @@ void pchg_task(void *u) pchg_run(ctx); } while (queue_count(&ctx->events)); } + /* + * Send one host event for all ports. Currently PCHG supports + * only WLC but in the future other types (e.g. WPC Qi) should + * send different device events. + */ + device_set_single_event(EC_DEVICE_EVENT_WLC); task_wait_event(-1); } } diff --git a/include/ec_commands.h b/include/ec_commands.h index 7b3e6de6d4..0ff5c4e571 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -4670,6 +4670,7 @@ enum ec_device_event { EC_DEVICE_EVENT_TRACKPAD, EC_DEVICE_EVENT_DSP, EC_DEVICE_EVENT_WIFI, + EC_DEVICE_EVENT_WLC, }; enum ec_device_event_param { |