ASoC: audio-ext-clk: avoid multiple initialization of pinctrl_info
Dynamic detection between wcd9335 and wcd934x codecs is supported on msmcobalt. Probe sequence of the two codec drivers can occur in any order. MCLK initialization is common for the two codecs which gets called twice. Avoid wcd934x codec's probe sequence from resetting wcd9335 codec's native mclk pinctrl if the pinctrl is already initialized. CRs-Fixed: 1066167 Change-Id: Idf65e15e08bb856d65b992b996cffa6ef2e6f974 Signed-off-by: Meng Wang <mwang@codeaurora.org>
This commit is contained in:
parent
d2afad6a90
commit
35b034ff27
1 changed files with 7 additions and 1 deletions
8
sound/soc/codecs/audio-ext-clk.c
Executable file → Normal file
8
sound/soc/codecs/audio-ext-clk.c
Executable file → Normal file
|
@ -193,7 +193,13 @@ static int audio_get_pinctrl(struct platform_device *pdev)
|
|||
int ret;
|
||||
|
||||
pnctrl_info = &audio_ap_clk2.pnctrl_info;
|
||||
pnctrl_info->pinctrl = NULL;
|
||||
|
||||
if (pnctrl_info->pinctrl) {
|
||||
dev_dbg(&pdev->dev, "%s: already requested before\n",
|
||||
__func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
pinctrl = devm_pinctrl_get(&pdev->dev);
|
||||
if (IS_ERR_OR_NULL(pinctrl)) {
|
||||
dev_dbg(&pdev->dev, "%s: Unable to get pinctrl handle\n",
|
||||
|
|
Loading…
Add table
Reference in a new issue