mirror of
https://github.com/torvalds/linux.git
synced 2024-12-11 21:52:04 +00:00
ASoC: codecs: wsa883x: Shutdown on error path
If probe fails, toggle shutdown via GPIO to save power and reverse probe actions. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20221109163759.1158837-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
7d95977533
commit
8e02238744
@ -1415,6 +1415,7 @@ static int wsa883x_probe(struct sdw_slave *pdev,
|
||||
|
||||
wsa883x->regmap = devm_regmap_init_sdw(pdev, &wsa883x_regmap_config);
|
||||
if (IS_ERR(wsa883x->regmap)) {
|
||||
gpiod_direction_output(wsa883x->sd_n, 1);
|
||||
dev_err(&pdev->dev, "regmap_init failed\n");
|
||||
ret = PTR_ERR(wsa883x->regmap);
|
||||
goto err;
|
||||
|
Loading…
Reference in New Issue
Block a user