From: Srinivas Kandagatla Date: Mon, 16 Mar 2020 12:03:03 +0000 (+0000) Subject: ASoC: codecs: wsa881x: request gpio direction before setting X-Git-Tag: v5.15~2585^2~245^2~1^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=28ddd846077a0c7d8382f41cef6840167d236c83;p=platform%2Fkernel%2Flinux-starfive.git ASoC: codecs: wsa881x: request gpio direction before setting Make sure that power down gpio direction is set to ouput before even setting it. Fixes: a0aab9e1404a ("ASoC: codecs: add wsa881x amplifier support") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200316120303.3780-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/wsa881x.c b/sound/soc/codecs/wsa881x.c index b59f1d0..25776aa6 100644 --- a/sound/soc/codecs/wsa881x.c +++ b/sound/soc/codecs/wsa881x.c @@ -1150,7 +1150,7 @@ static int wsa881x_probe(struct sdw_slave *pdev, wsa881x->sconfig.type = SDW_STREAM_PDM; pdev->prop.sink_ports = GENMASK(WSA881X_MAX_SWR_PORTS, 0); pdev->prop.sink_dpn_prop = wsa_sink_dpn_prop; - gpiod_set_value(wsa881x->sd_n, 1); + gpiod_direction_output(wsa881x->sd_n, 1); wsa881x->regmap = devm_regmap_init_sdw(pdev, &wsa881x_regmap_config); if (IS_ERR(wsa881x->regmap)) {