Commit 28ddd846 authored by Srinivas Kandagatla's avatar Srinivas Kandagatla Committed by Mark Brown

ASoC: codecs: wsa881x: request gpio direction before setting

Make sure that power down gpio direction is set to ouput
before even setting it.

Fixes: a0aab9e1 ("ASoC: codecs: add wsa881x amplifier support")
Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200316120303.3780-1-srinivas.kandagatla@linaro.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 1a0f2433
...@@ -1150,7 +1150,7 @@ static int wsa881x_probe(struct sdw_slave *pdev, ...@@ -1150,7 +1150,7 @@ static int wsa881x_probe(struct sdw_slave *pdev,
wsa881x->sconfig.type = SDW_STREAM_PDM; wsa881x->sconfig.type = SDW_STREAM_PDM;
pdev->prop.sink_ports = GENMASK(WSA881X_MAX_SWR_PORTS, 0); pdev->prop.sink_ports = GENMASK(WSA881X_MAX_SWR_PORTS, 0);
pdev->prop.sink_dpn_prop = wsa_sink_dpn_prop; 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); wsa881x->regmap = devm_regmap_init_sdw(pdev, &wsa881x_regmap_config);
if (IS_ERR(wsa881x->regmap)) { if (IS_ERR(wsa881x->regmap)) {
......
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