diff options
author | Alec Berg <alecaberg@chromium.org> | 2015-08-03 13:51:53 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-08-04 19:22:07 +0000 |
commit | d804e8fdbd1e9f238317c68d235add1806dcd49f (patch) | |
tree | 4a3b0a1939043a2e1aac02c6676036aacf919502 /include/usb_charge.h | |
parent | ccc085dd9a22ce123c16fcf24a816732a3df116f (diff) | |
download | chrome-ec-d804e8fdbd1e9f238317c68d235add1806dcd49f.tar.gz |
usb_charger: cleanup: move setting usb 2 switches to usb_charger
Move function to set D+/D- switches from board directory to
usb_charger module.
BUG=none
BRANCH=strago
TEST=make -j buildall
Change-Id: I5c5997c799cecea90448444863167af860a8f3e1
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/290421
Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'include/usb_charge.h')
-rw-r--r-- | include/usb_charge.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/usb_charge.h b/include/usb_charge.h index c10ae8d5b4..60f2c9742c 100644 --- a/include/usb_charge.h +++ b/include/usb_charge.h @@ -55,4 +55,19 @@ int usb_charge_ports_enabled(void); */ int usb_charger_port_is_sourcing_vbus(int port); +enum usb_switch { + USB_SWITCH_CONNECT, + USB_SWITCH_DISCONNECT, + USB_SWITCH_RESTORE, +}; + +/** + * Configure USB data switches on type-C port. + * + * @param port port number. + * @param setting new switch setting to configure. + */ +void usb_charger_set_switches(int port, enum usb_switch setting); + + #endif /* __CROS_EC_USB_CHARGE_H */ |