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 | |
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')
-rw-r--r-- | include/usb_charge.h | 15 | ||||
-rw-r--r-- | include/usb_mux.h | 1 | ||||
-rw-r--r-- | include/usb_pd.h | 14 |
3 files changed, 16 insertions, 14 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 */ diff --git a/include/usb_mux.h b/include/usb_mux.h index d94c0c4606..3cb5c4e49d 100644 --- a/include/usb_mux.h +++ b/include/usb_mux.h @@ -8,6 +8,7 @@ #ifndef __CROS_EC_USB_MUX_H #define __CROS_EC_USB_MUX_H +#include "usb_charge.h" #include "usb_pd.h" /* USB-C mux state */ diff --git a/include/usb_pd.h b/include/usb_pd.h index b25eca3ebc..5b42b687e0 100644 --- a/include/usb_pd.h +++ b/include/usb_pd.h @@ -1191,20 +1191,6 @@ extern const int pd_snk_pdo_cnt; */ int pd_get_source_pdo(const uint32_t **src_pdo); -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 board_set_usb_switches(int port, enum usb_switch setting); - /** * Request that a host event be sent to notify the AP of a PD power event. * |