On LE build or Android build, some of BT chip (not one from Qualcomm) prevents system from getting into suspend. Reason for that could be continuous sending data to MSM or QSD over UART or clock enablement and wake lock holding. To work around this without changing BT solution, platform suspend and resume can be implemented within HSUART driver.
static int msm_hs_suspend(struct platform_device *pdev)
{
struct msm_hs_port *msm_uport;
struct uart_port *uport;
msm_uport = &q_uart_port[pdev->id];
uport = msm_uport->uport;
clk_disable(msm_uport->clk);
msm_uport->clk_state = MSM_HS_CLK_OFF;
disable_irq_wake(uport->irq);
wake_unlock(&rx->wake_lock);
return 0;
}
static int msm_hs_resume(struct platform_device *pdev)
{
struct msm_hs_port *msm_uport;
struct uart_port *uport;
msm_uport = &q_uart_port[pdev->id];
uport = msm_uport->uport;
enable_irq_wake(uport->irq);
msm_hs_request_clock_on(uport);
return 0;
}
This can be applied to 2.6.27 kernel and 2.6.29 kernel for LE and Android build.
No comments:
Post a Comment