Merge "soc: swr-mstr: Fix headset detect issue due to master.num_dev not updated"

This commit is contained in:
qctecmdr 2020-08-25 11:21:17 -07:00 committed by Gerrit - the friendly Code Review server
commit 94c552c1c8

View File

@ -2165,20 +2165,21 @@ handle_irq:
case SWRM_INTERRUPT_STATUS_CLK_STOP_FINISHED: case SWRM_INTERRUPT_STATUS_CLK_STOP_FINISHED:
break; break;
case SWRM_INTERRUPT_STATUS_EXT_CLK_STOP_WAKEUP: case SWRM_INTERRUPT_STATUS_EXT_CLK_STOP_WAKEUP:
if (swrm->state == SWR_MSTR_UP) if (swrm->state == SWR_MSTR_UP) {
dev_dbg(swrm->dev, dev_dbg(swrm->dev,
"%s:SWR Master is already up\n", "%s:SWR Master is already up\n",
__func__); __func__);
else } else {
dev_err_ratelimited(swrm->dev, dev_err_ratelimited(swrm->dev,
"%s: SWR wokeup during clock stop\n", "%s: SWR wokeup during clock stop\n",
__func__); __func__);
/* It might be possible the slave device gets reset /* It might be possible the slave device gets
* and slave interrupt gets missed. So re-enable * reset and slave interrupt gets missed. So
* Host IRQ and process slave pending * re-enable Host IRQ and process slave pending
* interrupts, if any. * interrupts, if any.
*/ */
swrm_enable_slave_irq(swrm); swrm_enable_slave_irq(swrm);
}
break; break;
default: default:
dev_err_ratelimited(swrm->dev, dev_err_ratelimited(swrm->dev,
@ -2674,6 +2675,8 @@ static int swrm_probe(struct platform_device *pdev)
SWRM_NUM_AUTO_ENUM_SLAVES); SWRM_NUM_AUTO_ENUM_SLAVES);
ret = -EINVAL; ret = -EINVAL;
goto err_pdata_fail; goto err_pdata_fail;
} else {
swrm->master.num_dev = swrm->num_dev;
} }
} }