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 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022,2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
@@ -4181,7 +4181,7 @@ static int wcd938x_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);
|
||||
@@ -4190,7 +4190,7 @@ static int wcd938x_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);
|
||||
@@ -4619,7 +4619,11 @@ static int wcd938x_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
goto err_lock_init;
|
||||
|
||||
wcd938x_reset(dev);
|
||||
ret = wcd938x_reset(dev);
|
||||
if (ret == -EPROBE_DEFER) {
|
||||
dev_err(dev, "%s: wcd reset failed!\n", __func__);
|
||||
goto err_lock_init;
|
||||
}
|
||||
|
||||
wcd938x->wakeup = wcd938x_wakeup;
|
||||
|
||||
|
Reference in New Issue
Block a user