From 401498bb6a1c38771720c84cc1d58f2f5dbf7ac0 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Wed, 26 Nov 2014 12:40:05 -0800 Subject: lightbar: ask the PD MCU for the charge direction This exposes the pd_exchange_status() function and lets it return the charge port that the PD reports, so that the lightbar TAP sequence can decide which direction to display. BUG=chrome-os-partner:32227 BRANCH=ToT, samus TEST=make buildall -j Change-Id: I78b57fbeaaf38fee15c86eca4d90abce77e2f722 Signed-off-by: Bill Richardson Reviewed-on: https://chromium-review.googlesource.com/232092 Reviewed-by: Alec Berg --- include/host_command.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/host_command.h') diff --git a/include/host_command.h b/include/host_command.h index a25f06d10a..e833b96101 100644 --- a/include/host_command.h +++ b/include/host_command.h @@ -213,6 +213,16 @@ void host_throttle_cpu(int throttle); */ void host_command_pd_send_status(void); +/** + * Ask the PD MCU for its status, obtaining the current charge_port as a + * side-effect (-1 means none or don't know). + * + * @param charge_port If present, updated with the current charge port: + * -1 == none/unknown, 0 == left, 1 == right. + */ +void pd_exchange_status(int *charge_port); + + /** * Send host command to PD MCU. * -- cgit v1.2.1