diff options
author | Dominic Chen <ddchen@chromium.org> | 2014-06-06 14:46:00 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-07-02 00:45:29 +0000 |
commit | bab451bd7cdc71c5faff7f220ffc48e32da2e9ad (patch) | |
tree | 49d1e2d40582cc12f03af7585282f55faf71702a /chip/stm32/usb_pd_phy.c | |
parent | 73ad1f30c8ed14206ec9146d791773b5e64c0a3a (diff) | |
download | chrome-ec-bab451bd7cdc71c5faff7f220ffc48e32da2e9ad.tar.gz |
pd: add support for suspending the task
used by usb debug, which uses the same spi port
BRANCH=none
BUG=none
TEST=verify PD communication works after suspend with two fruitpies
Change-Id: I9d7e963fc27dc5303a8b87a9ddb68e97600a5a10
Signed-off-by: Dominic Chen <ddchen@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/202992
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'chip/stm32/usb_pd_phy.c')
-rw-r--r-- | chip/stm32/usb_pd_phy.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chip/stm32/usb_pd_phy.c b/chip/stm32/usb_pd_phy.c index 895d5dab9d..b4fefa8fa4 100644 --- a/chip/stm32/usb_pd_phy.c +++ b/chip/stm32/usb_pd_phy.c @@ -394,6 +394,14 @@ void pd_rx_handler(void) DECLARE_IRQ(STM32_IRQ_COMP, pd_rx_handler, 1); #endif +/* --- release hardware --- */ +void pd_hw_release(void) +{ + __hw_timer_enable_clock(TIM_RX, 0); + __hw_timer_enable_clock(TIM_TX, 0); + dma_disable(DMAC_SPI_TX); +} + /* --- Startup initialization --- */ void *pd_hw_init(void) { |