diff options
| author | Jim Wylder <jwylder@motorola.com> | 2014-08-25 13:03:43 -0500 | 
|---|---|---|
| committer | James Wylder <jwylder@motorola.com> | 2014-08-26 21:48:50 +0000 | 
| commit | a1ac4d40cc3bc8cc91f78272d5669bee92f1286f (patch) | |
| tree | d7f669956b4f3a425afd646c0da201c593844125 /drivers/misc/ti-st/st_ll.c | |
| parent | 83d8dbe505092e9c5fc99e8f00552ef5b3470a41 (diff) | |
| download | olio-linux-3.10-a1ac4d40cc3bc8cc91f78272d5669bee92f1286f.tar.xz olio-linux-3.10-a1ac4d40cc3bc8cc91f78272d5669bee92f1286f.zip  | |
IKXCLOCK-3659 ti-st: Hold wakelock when controller is awake
Even with the RTS signaling, the bluetooth controller expects the
host to be awake when the controller is awake.
Bug: 17247373
Change-Id: I5f4beadea0611722a236b08ec3a9817f61b7f4df
Signed-off-by: Jim Wylder <jwylder@motorola.com>
Diffstat (limited to 'drivers/misc/ti-st/st_ll.c')
| -rw-r--r-- | drivers/misc/ti-st/st_ll.c | 12 | 
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/misc/ti-st/st_ll.c b/drivers/misc/ti-st/st_ll.c index bf8d3d5bc01..fa4b8e48ada 100644 --- a/drivers/misc/ti-st/st_ll.c +++ b/drivers/misc/ti-st/st_ll.c @@ -24,6 +24,7 @@  #include <linux/module.h>  #include <linux/platform_device.h>  #include <linux/ti_wilink_st.h> +#include <linux/wakelock.h>  /**********************************************************************/  /* internal functions */ @@ -37,13 +38,17 @@ static void send_ll_cmd(struct st_data_s *st_data,  	kim_plat_data = (struct kim_data_s *)st_data->kim_data;  	pdata = kim_plat_data->kim_pdev->dev.platform_data; -	if (cmd == LL_WAKE_UP_IND || cmd == LL_WAKE_UP_ACK) +	if (cmd == LL_WAKE_UP_IND || cmd == LL_WAKE_UP_ACK) { +		wake_lock(&st_data->st_awake);  		omap_serial_runtime_get(pdata->port_index); +	}  	st_int_write(st_data, &cmd, 1); -	if (cmd == LL_SLEEP_ACK) +	if (cmd == LL_SLEEP_ACK) { +		wake_unlock(&st_data->st_awake);  		omap_serial_runtime_put(pdata->port_index); +	}  	return;  } @@ -117,6 +122,7 @@ void st_ll_enable(struct st_data_s *ll)  	if (ll->ll_state == ST_LL_INVALID) {  		kim_plat_data = (struct kim_data_s *)ll->kim_data;  		pdata = kim_plat_data->kim_pdev->dev.platform_data; +		wake_lock(&ll->st_awake);  		omap_serial_runtime_get(pdata->port_index);  	}  	ll->ll_state = ST_LL_AWAKE; @@ -133,6 +139,7 @@ void st_ll_disable(struct st_data_s *ll)  	    ll->ll_state == ST_LL_ASLEEP_TO_AWAKE) {  		kim_plat_data = (struct kim_data_s *)ll->kim_data;  		pdata = kim_plat_data->kim_pdev->dev.platform_data; +		wake_unlock(&ll->st_awake);  		omap_serial_runtime_put(pdata->port_index);  	}  	ll->ll_state = ST_LL_INVALID; @@ -194,6 +201,7 @@ long st_ll_init(struct st_data_s *ll)  {  	/* set state to invalid */  	ll->ll_state = ST_LL_INVALID; +  	return 0;  }  |