Merge "soc: swr-mstr: Fix headset detect issue during clk stop wakeup"

This commit is contained in:
qctecmdr
2021-09-29 21:34:47 -07:00
committed by Gerrit - the friendly Code Review server
2 changed files with 9 additions and 2 deletions

View File

@@ -1991,10 +1991,12 @@ static void swrm_enable_slave_irq(struct swr_mstr_ctrl *swrm)
dev_dbg(swrm->dev, "%s: slave status: 0x%x\n", __func__, status);
for (i = 0; i < (swrm->num_dev + 1); i++) {
if (status & SWRM_MCP_SLV_STATUS_MASK) {
swrm_cmd_fifo_rd_cmd(swrm, &temp, i, 0x0,
if (!swrm->clk_stop_wakeup) {
swrm_cmd_fifo_rd_cmd(swrm, &temp, i, 0x0,
SWRS_SCP_INT_STATUS_CLEAR_1, 1);
swrm_cmd_fifo_wr_cmd(swrm, 0xFF, i, 0x0,
swrm_cmd_fifo_wr_cmd(swrm, 0xFF, i, 0x0,
SWRS_SCP_INT_STATUS_CLEAR_1);
}
swrm_cmd_fifo_wr_cmd(swrm, 0x4, i, 0x0,
SWRS_SCP_INT_STATUS_MASK_1);
}
@@ -2243,7 +2245,9 @@ handle_irq:
* re-enable Host IRQ and process slave pending
* interrupts, if any.
*/
swrm->clk_stop_wakeup = true;
swrm_enable_slave_irq(swrm);
swrm->clk_stop_wakeup = false;
}
break;
default:
@@ -2864,6 +2868,8 @@ static int swrm_probe(struct platform_device *pdev)
swrm->dev_up = true;
swrm->state = SWR_MSTR_UP;
swrm->ipc_wakeup = false;
swrm->enable_slave_irq = false;
swrm->clk_stop_wakeup = false;
swrm->ipc_wakeup_triggered = false;
swrm->disable_div2_clk_switch = FALSE;
init_completion(&swrm->reset);

View File

@@ -200,6 +200,7 @@ struct swr_mstr_ctrl {
u32 num_auto_enum;
bool enable_slave_irq;
u32 is_always_on;
bool clk_stop_wakeup;
struct swr_port_params pp[SWR_UC_MAX][SWR_MAX_MSTR_PORT_NUM];/*max_devNum * max_ports 11 * 14 */
#ifdef CONFIG_DEBUG_FS
struct dentry *debugfs_swrm_dent;