asoc: codecs: add child devices after completing initialization
In bolero-cdc and tx, va, wsa and rx macros, move schedule_work call to add the child devices to the point later to where the parent initialization gets completed. Change-Id: Iaa07329a25020dde21d9249c3848bb7fcf7d816a Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
2f7a802e67
commit
b6430e162b
@@ -1400,7 +1400,6 @@ static int bolero_probe(struct platform_device *pdev)
|
|||||||
mutex_init(&priv->vote_lock);
|
mutex_init(&priv->vote_lock);
|
||||||
INIT_WORK(&priv->bolero_add_child_devices_work,
|
INIT_WORK(&priv->bolero_add_child_devices_work,
|
||||||
bolero_add_child_devices);
|
bolero_add_child_devices);
|
||||||
schedule_work(&priv->bolero_add_child_devices_work);
|
|
||||||
|
|
||||||
/* Register LPASS core hw vote */
|
/* Register LPASS core hw vote */
|
||||||
lpass_core_hw_vote = devm_clk_get(&pdev->dev, "lpass_core_hw_vote");
|
lpass_core_hw_vote = devm_clk_get(&pdev->dev, "lpass_core_hw_vote");
|
||||||
@@ -1423,7 +1422,7 @@ static int bolero_probe(struct platform_device *pdev)
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
priv->lpass_audio_hw_vote = lpass_audio_hw_vote;
|
priv->lpass_audio_hw_vote = lpass_audio_hw_vote;
|
||||||
|
schedule_work(&priv->bolero_add_child_devices_work);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -4233,13 +4233,12 @@ static int rx_macro_probe(struct platform_device *pdev)
|
|||||||
"%s: register macro failed\n", __func__);
|
"%s: register macro failed\n", __func__);
|
||||||
goto err_reg_macro;
|
goto err_reg_macro;
|
||||||
}
|
}
|
||||||
schedule_work(&rx_priv->rx_macro_add_child_devices_work);
|
|
||||||
pm_runtime_set_autosuspend_delay(&pdev->dev, AUTO_SUSPEND_DELAY);
|
pm_runtime_set_autosuspend_delay(&pdev->dev, AUTO_SUSPEND_DELAY);
|
||||||
pm_runtime_use_autosuspend(&pdev->dev);
|
pm_runtime_use_autosuspend(&pdev->dev);
|
||||||
pm_runtime_set_suspended(&pdev->dev);
|
pm_runtime_set_suspended(&pdev->dev);
|
||||||
pm_suspend_ignore_children(&pdev->dev, true);
|
pm_suspend_ignore_children(&pdev->dev, true);
|
||||||
pm_runtime_enable(&pdev->dev);
|
pm_runtime_enable(&pdev->dev);
|
||||||
|
schedule_work(&rx_priv->rx_macro_add_child_devices_work);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_reg_macro:
|
err_reg_macro:
|
||||||
|
@@ -3522,13 +3522,13 @@ static int tx_macro_probe(struct platform_device *pdev)
|
|||||||
"%s: register macro failed\n", __func__);
|
"%s: register macro failed\n", __func__);
|
||||||
goto err_reg_macro;
|
goto err_reg_macro;
|
||||||
}
|
}
|
||||||
if (is_used_tx_swr_gpio)
|
|
||||||
schedule_work(&tx_priv->tx_macro_add_child_devices_work);
|
|
||||||
pm_runtime_set_autosuspend_delay(&pdev->dev, AUTO_SUSPEND_DELAY);
|
pm_runtime_set_autosuspend_delay(&pdev->dev, AUTO_SUSPEND_DELAY);
|
||||||
pm_runtime_use_autosuspend(&pdev->dev);
|
pm_runtime_use_autosuspend(&pdev->dev);
|
||||||
pm_runtime_set_suspended(&pdev->dev);
|
pm_runtime_set_suspended(&pdev->dev);
|
||||||
pm_suspend_ignore_children(&pdev->dev, true);
|
pm_suspend_ignore_children(&pdev->dev, true);
|
||||||
pm_runtime_enable(&pdev->dev);
|
pm_runtime_enable(&pdev->dev);
|
||||||
|
if (is_used_tx_swr_gpio)
|
||||||
|
schedule_work(&tx_priv->tx_macro_add_child_devices_work);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
err_reg_macro:
|
err_reg_macro:
|
||||||
|
@@ -3203,13 +3203,13 @@ static int va_macro_probe(struct platform_device *pdev)
|
|||||||
dev_err(&pdev->dev, "%s: register macro failed\n", __func__);
|
dev_err(&pdev->dev, "%s: register macro failed\n", __func__);
|
||||||
goto reg_macro_fail;
|
goto reg_macro_fail;
|
||||||
}
|
}
|
||||||
if (is_used_va_swr_gpio)
|
|
||||||
schedule_work(&va_priv->va_macro_add_child_devices_work);
|
|
||||||
pm_runtime_set_autosuspend_delay(&pdev->dev, VA_AUTO_SUSPEND_DELAY);
|
pm_runtime_set_autosuspend_delay(&pdev->dev, VA_AUTO_SUSPEND_DELAY);
|
||||||
pm_runtime_use_autosuspend(&pdev->dev);
|
pm_runtime_use_autosuspend(&pdev->dev);
|
||||||
pm_runtime_set_suspended(&pdev->dev);
|
pm_runtime_set_suspended(&pdev->dev);
|
||||||
pm_suspend_ignore_children(&pdev->dev, true);
|
pm_suspend_ignore_children(&pdev->dev, true);
|
||||||
pm_runtime_enable(&pdev->dev);
|
pm_runtime_enable(&pdev->dev);
|
||||||
|
if (is_used_va_swr_gpio)
|
||||||
|
schedule_work(&va_priv->va_macro_add_child_devices_work);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
reg_macro_fail:
|
reg_macro_fail:
|
||||||
|
@@ -3237,13 +3237,12 @@ static int wsa_macro_probe(struct platform_device *pdev)
|
|||||||
dev_err(&pdev->dev, "%s: register macro failed\n", __func__);
|
dev_err(&pdev->dev, "%s: register macro failed\n", __func__);
|
||||||
goto reg_macro_fail;
|
goto reg_macro_fail;
|
||||||
}
|
}
|
||||||
schedule_work(&wsa_priv->wsa_macro_add_child_devices_work);
|
|
||||||
pm_runtime_set_autosuspend_delay(&pdev->dev, AUTO_SUSPEND_DELAY);
|
pm_runtime_set_autosuspend_delay(&pdev->dev, AUTO_SUSPEND_DELAY);
|
||||||
pm_runtime_use_autosuspend(&pdev->dev);
|
pm_runtime_use_autosuspend(&pdev->dev);
|
||||||
pm_runtime_set_suspended(&pdev->dev);
|
pm_runtime_set_suspended(&pdev->dev);
|
||||||
pm_suspend_ignore_children(&pdev->dev, true);
|
pm_suspend_ignore_children(&pdev->dev, true);
|
||||||
pm_runtime_enable(&pdev->dev);
|
pm_runtime_enable(&pdev->dev);
|
||||||
|
schedule_work(&wsa_priv->wsa_macro_add_child_devices_work);
|
||||||
return ret;
|
return ret;
|
||||||
reg_macro_fail:
|
reg_macro_fail:
|
||||||
mutex_destroy(&wsa_priv->mclk_lock);
|
mutex_destroy(&wsa_priv->mclk_lock);
|
||||||
|
Reference in New Issue
Block a user