asoc: codec: defer the probe if msm cdc pinctrl is not probed
Defer the probe when the msm cdc pinctrl driver is not proded. Change-Id: Ia6aaaca7c55b60b53008ffda0fc40e5db407cd2a Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2024, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
@@ -4706,7 +4706,7 @@ static int wcd939x_reset(struct device *dev)
|
||||
if (rc) {
|
||||
dev_err_ratelimited(dev, "%s: wcd sleep state request fail!\n",
|
||||
__func__);
|
||||
return rc;
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
/* 20us sleep required after pulling the reset gpio to LOW */
|
||||
usleep_range(20, 30);
|
||||
@@ -4715,7 +4715,7 @@ static int wcd939x_reset(struct device *dev)
|
||||
if (rc) {
|
||||
dev_err_ratelimited(dev, "%s: wcd active state request fail!\n",
|
||||
__func__);
|
||||
return rc;
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
/* 20us sleep required after pulling the reset gpio to HIGH */
|
||||
usleep_range(20, 30);
|
||||
@@ -5497,7 +5497,11 @@ static int wcd939x_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
goto err_lock_init;
|
||||
|
||||
wcd939x_reset(dev);
|
||||
ret = wcd939x_reset(dev);
|
||||
if (ret == -EPROBE_DEFER) {
|
||||
dev_err(dev, "%s: wcd reset failed!\n", __func__);
|
||||
goto err_lock_init;
|
||||
}
|
||||
|
||||
wcd939x->wakeup = wcd939x_wakeup;
|
||||
|
||||
|
Referens i nytt ärende
Block a user