summaryrefslogtreecommitdiff
path: root/driver/charger/sm5803.h
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2020-05-08 16:01:02 -0600
committerCommit Bot <commit-bot@chromium.org>2020-05-14 18:40:57 +0000
commit1b9e5bf0c2768275c7b4e811b85854f4f7b5ab96 (patch)
treea69c874cc332d5ac39f7000670aa8f55e2e8c15b /driver/charger/sm5803.h
parent82976779e1ee613824da39d6215bf880f6434c90 (diff)
downloadchrome-ec-1b9e5bf0c2768275c7b4e811b85854f4f7b5ab96.tar.gz
SM5803: Add cached vbus presence
Cache the current Vbus presence to provide a quick-access reference to the PD task. BRANCH=None BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I4b90339b28d182a57dabd39725315d061b8b7336 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2191374 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'driver/charger/sm5803.h')
-rw-r--r--driver/charger/sm5803.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/driver/charger/sm5803.h b/driver/charger/sm5803.h
index 84b9421353..65ded1b286 100644
--- a/driver/charger/sm5803.h
+++ b/driver/charger/sm5803.h
@@ -236,6 +236,9 @@ enum sm5803_gpio0_modes {
#define INPUT_I_MIN 0
#define INPUT_I_STEP SM5803_CURRENT_STEP
+/* Expose cached Vbus presence */
+int sm5803_is_vbus_present(int chgnum);
+
/* Expose functions to control charger's GPIO and CHG_DET configuration */
enum ec_error_list sm5803_configure_gpio0(int chgnum,
enum sm5803_gpio0_modes mode, int od);