summaryrefslogtreecommitdiff
path: root/board/samus_pd
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2015-08-03 13:51:53 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-08-04 19:22:07 +0000
commitd804e8fdbd1e9f238317c68d235add1806dcd49f (patch)
tree4a3b0a1939043a2e1aac02c6676036aacf919502 /board/samus_pd
parentccc085dd9a22ce123c16fcf24a816732a3df116f (diff)
downloadchrome-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 'board/samus_pd')
-rw-r--r--board/samus_pd/board.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/board/samus_pd/board.c b/board/samus_pd/board.c
index e1941cabbe..eb2273121b 100644
--- a/board/samus_pd/board.c
+++ b/board/samus_pd/board.c
@@ -62,13 +62,6 @@ static struct ec_response_host_event_status host_event_status __aligned(4);
/* Desired input current limit */
static int desired_charge_rate_ma = -1;
-/*
- * Store the state of our USB data switches so that they can be restored
- * after pericom reset.
- */
-static int usb_switch_state[CONFIG_USB_PD_PORT_COUNT];
-static struct mutex usb_switch_lock[CONFIG_USB_PD_PORT_COUNT];
-
/* PWM channels. Must be in the exact same order as in enum pwm_channel. */
const struct pwm_t pwm_channels[] = {
{STM32_TIM(15), STM32_TIM_CH(2), 0, GPIO_ILIM_ADJ_PWM, GPIO_ALT_F1},
@@ -391,19 +384,6 @@ const struct i2c_port_t i2c_ports[] = {
};
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
-void board_set_usb_switches(int port, enum usb_switch setting)
-{
- /* If switch is not changing then return */
- if (setting == usb_switch_state[port])
- return;
-
- mutex_lock(&usb_switch_lock[port]);
- if (setting != USB_SWITCH_RESTORE)
- usb_switch_state[port] = setting;
- pi3usb9281_set_switches(port, usb_switch_state[port]);
- mutex_unlock(&usb_switch_lock[port]);
-}
-
int board_get_battery_soc(void)
{
return batt_soc;