Commit 8e022387 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Mark Brown

ASoC: codecs: wsa883x: Shutdown on error path

If probe fails, toggle shutdown via GPIO to save power and reverse
probe actions.
Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20221109163759.1158837-1-krzysztof.kozlowski@linaro.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 7d959775
...@@ -1415,6 +1415,7 @@ static int wsa883x_probe(struct sdw_slave *pdev, ...@@ -1415,6 +1415,7 @@ static int wsa883x_probe(struct sdw_slave *pdev,
wsa883x->regmap = devm_regmap_init_sdw(pdev, &wsa883x_regmap_config); wsa883x->regmap = devm_regmap_init_sdw(pdev, &wsa883x_regmap_config);
if (IS_ERR(wsa883x->regmap)) { if (IS_ERR(wsa883x->regmap)) {
gpiod_direction_output(wsa883x->sd_n, 1);
dev_err(&pdev->dev, "regmap_init failed\n"); dev_err(&pdev->dev, "regmap_init failed\n");
ret = PTR_ERR(wsa883x->regmap); ret = PTR_ERR(wsa883x->regmap);
goto err; goto err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment