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>
This commit is contained in:
Alec Berg
2015-08-03 13:51:53 -07:00
committed by ChromeOS Commit Bot
parent ccc085dd9a
commit d804e8fdbd
12 changed files with 40 additions and 99 deletions

View File

@@ -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 */

View File

@@ -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 */

View File

@@ -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.
*