mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 16:41:55 +00:00
samus: add ability for PD MCU to send host event to AP
Add host event for PD up to AP. The PD toggles a gpio line to EC causing an interrupt on EC. The EC then sends host command down to PD MCU to get its status. There is a new status bit for PD host event, so when EC see's the PD host event status bit, it sends a PD host event to the AP. There is currently only one host event for PD to AP. BUG=chrome-os-partner:31361 BRANCH=none TEST=added PD console command pdevent, which initiates the host event. when sent, verified on EC that it sets the correct host event bit using hostevent console command Change-Id: If1a59a3232e2f9a49f272c6dee5319254d87b9a9 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/213371 Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
e913bc15b8
commit
1933fb8ff7
@@ -271,6 +271,9 @@ enum host_event_code {
|
||||
/* Hang detect logic detected a hang and warm rebooted the AP */
|
||||
EC_HOST_EVENT_HANG_REBOOT = 21,
|
||||
|
||||
/* PD MCU triggering host event */
|
||||
EC_HOST_EVENT_PD_MCU = 22,
|
||||
|
||||
/*
|
||||
* The high bit of the event mask is not used as a host event code. If
|
||||
* it reads back as set, then the entire event mask should be
|
||||
@@ -2497,8 +2500,9 @@ struct ec_params_pd_status {
|
||||
} __packed;
|
||||
|
||||
/* Status of PD being sent back to EC */
|
||||
#define PD_STATUS_HOST_EVENT (1 << 0)
|
||||
struct ec_response_pd_status {
|
||||
int8_t status; /* PD MCU status */
|
||||
uint32_t status; /* PD MCU status */
|
||||
uint32_t curr_lim_ma; /* input current limit */
|
||||
} __packed;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user