ec/google/chromeec: Add interface for offmode heartbeat command
Implement google_chromeec_offmode_heartbeat() to wrap the EC_CMD_ENABLE_OFFMODE_HEARTBEAT host command. This allows the AP to signal the EC to maintain the power state required for off-mode UI (such as the charging applet) during shutdown or low-power transitions. BUG=b:439819922 BRANCH=none TEST=Build and verify that the charger applet can successfully call this function to enable heartbeat signaling. Change-Id: Ic2ed464bf454e614a098ee5bbbb662adc9d79144 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/91484 Reviewed-by: Kapil Porwal <kapilporwal@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Caveh Jalali <caveh@chromium.org>
This commit is contained in:
parent
125d9c8643
commit
a1dd5f05b0
2 changed files with 11 additions and 0 deletions
|
|
@ -795,6 +795,15 @@ int rtc_get(struct rtc_time *time)
|
|||
}
|
||||
#endif
|
||||
|
||||
int google_chromeec_offmode_heartbeat(void)
|
||||
{
|
||||
struct chromeec_command cmd = {
|
||||
.cmd_code = EC_CMD_ENABLE_OFFMODE_HEARTBEAT,
|
||||
};
|
||||
|
||||
return google_chromeec_command(&cmd);
|
||||
}
|
||||
|
||||
int google_chromeec_reboot(enum ec_reboot_cmd type, uint8_t flags)
|
||||
{
|
||||
const struct ec_params_reboot_ec params = {
|
||||
|
|
|
|||
|
|
@ -110,6 +110,8 @@ int google_chromeec_reboot(enum ec_reboot_cmd type, uint8_t flags);
|
|||
|
||||
void google_chromeec_ap_poweroff(void);
|
||||
|
||||
int google_chromeec_offmode_heartbeat(void);
|
||||
|
||||
/**
|
||||
* Get data from Cros Board Info
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue