From 822e4da8a67b777df7fa40b00aba434cb94ff601 Mon Sep 17 00:00:00 2001 From: Devin Kim Date: Fri, 22 Aug 2014 23:33:34 -0700 Subject: Do not set timer if PROC_BTWRITE_TIMER_TIMEOUT_MS == 0 When PROC_BTWRITE_TIMER_TIMEOUT_MS is set to 0, it disables btwrite timer setup so that bluesleep driver controls timeout for tx data Bug: 16889688 Change-Id: I721ae88fdd671495c509acfcbdee559daf34e089 --- src/upio.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/upio.c b/src/upio.c index 360c6d4..9008355 100644 --- a/src/upio.c +++ b/src/upio.c @@ -372,6 +372,7 @@ void upio_set(uint8_t pio, uint8_t action, uint8_t polarity) ALOGE("upio_set : write(%s) failed: %s (%d)", VENDOR_LPM_PROC_NODE, strerror(errno),errno); } +#if (PROC_BTWRITE_TIMER_TIMEOUT_MS != 0) else { if (action == UPIO_ASSERT) @@ -395,6 +396,7 @@ void upio_set(uint8_t pio, uint8_t action, uint8_t polarity) } } } +#endif if (fd >= 0) close(fd); @@ -453,6 +455,7 @@ void upio_set(uint8_t pio, uint8_t action, uint8_t polarity) ALOGE("upio_set : write(%s) failed: %s (%d)", VENDOR_BTWRITE_PROC_NODE, strerror(errno),errno); } +#if (PROC_BTWRITE_TIMER_TIMEOUT_MS != 0) else { lpm_proc_cb.btwrite_active = TRUE; @@ -469,6 +472,7 @@ void upio_set(uint8_t pio, uint8_t action, uint8_t polarity) timer_settime(lpm_proc_cb.timer_id, 0, &ts, 0); } } +#endif UPIODBG("proc btwrite assertion"); -- cgit v1.2.3