Skip to content

Commit d8b7620

Browse files
author
Bartosz Golaszewski
committed
power: sequencing: qcom-wcn: set the wlan-enable GPIO to output
Commit a9aaf1f ("power: sequencing: request the WLAN enable GPIO as-is") broke WLAN on boards on which the wlan-enable GPIO enabling the wifi module isn't in output mode by default. We need to set direction to output while retaining the value that was already set to keep the ath module on if it's already started. Fixes: a9aaf1f ("power: sequencing: request the WLAN enable GPIO as-is") Link: https://lore.kernel.org/r/20240823115500.37280-1-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
1 parent 5be63fc commit d8b7620

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/power/sequencing/pwrseq-qcom-wcn.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,13 @@ static int pwrseq_qcom_wcn_probe(struct platform_device *pdev)
288288
return dev_err_probe(dev, PTR_ERR(ctx->wlan_gpio),
289289
"Failed to get the WLAN enable GPIO\n");
290290

291+
/*
292+
* Set direction to output but keep the current value in order to not
293+
* disable the WLAN module accidentally if it's already powered on.
294+
*/
295+
gpiod_direction_output(ctx->wlan_gpio,
296+
gpiod_get_value_cansleep(ctx->wlan_gpio));
297+
291298
ctx->clk = devm_clk_get_optional(dev, NULL);
292299
if (IS_ERR(ctx->clk))
293300
return dev_err_probe(dev, PTR_ERR(ctx->clk),

0 commit comments

Comments
 (0)