summaryrefslogtreecommitdiff
path: root/drivers/mfd/twl6040.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2015-09-18 19:29:04 +0300
committerLee Jones <lee.jones@linaro.org>2015-10-26 17:48:56 +0300
commit75c08f17ec87c2d742487bb87408d6feebc526bd (patch)
treeb481df4848167a8dee3ed2a503cb8d859552f350 /drivers/mfd/twl6040.c
parent62a2e633474107a9ae93dfedf16341ec6414a907 (diff)
downloadlinux-75c08f17ec87c2d742487bb87408d6feebc526bd.tar.xz
mfd: twl6040: Fix deferred probe handling for clk32k
Commit 68bab8662f49 ("mfd: twl6040: Optional clk32k clock handling") added clock handling for the 32k clock from palmas-clk. However, that patch did not consider a typical situation where twl6040 is built-in, and palmas-clk is a loadable module like we have in omap2plus_defconfig. If palmas-clk is not loaded before twl6040 probes, we will get a "clk32k is not handled" warning during booting. This means that any drivers relying on this clock will mysteriously fail, including omap5-uevm WLAN and audio. Note that for WLAN, we probably should also eventually get the clk32kgaudio for MMC3 directly as that's shared between audio and WLAN SDIO at least for omap5-uevm. It seems the WLAN chip cannot get it as otherwise MMC3 won't get properly probed. Fixes: 68bab8662f49 ("mfd: twl6040: Optional clk32k clock handling") Signed-off-by: Tony Lindgren <tony@atomide.com> Reviewed-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/twl6040.c')
-rw-r--r--drivers/mfd/twl6040.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mfd/twl6040.c b/drivers/mfd/twl6040.c
index a151ee2eed2a..08a693cd38cc 100644
--- a/drivers/mfd/twl6040.c
+++ b/drivers/mfd/twl6040.c
@@ -647,6 +647,8 @@ static int twl6040_probe(struct i2c_client *client,
twl6040->clk32k = devm_clk_get(&client->dev, "clk32k");
if (IS_ERR(twl6040->clk32k)) {
+ if (PTR_ERR(twl6040->clk32k) == -EPROBE_DEFER)
+ return -EPROBE_DEFER;
dev_info(&client->dev, "clk32k is not handled\n");
twl6040->clk32k = NULL;
}