Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

power: sequencing: qcom-wcn: explain why we need the WLAN_EN GPIO hack

With the recent rework of the PCI power control code, the workaround for
the wlan-enable GPIO - where we don't set a default (low) state in the
power sequencing driver, but instead request the pin as-is - should no
longer be needed but some platforms still fail to probe the WLAN
controller. This is caused by the Qcom PCIe controller and needs a
workaround in the controller driver so add a FIXME to eventually remove
the hack from this driver once this is done.

Link: https://lore.kernel.org/r/20250102121530.26993-1-brgl@bgdev.pl
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

+7
+7
drivers/power/sequencing/pwrseq-qcom-wcn.c
··· 396 396 return dev_err_probe(dev, PTR_ERR(ctx->bt_gpio), 397 397 "Failed to get the Bluetooth enable GPIO\n"); 398 398 399 + /* 400 + * FIXME: This should actually be GPIOD_OUT_LOW, but doing so would 401 + * cause the WLAN power to be toggled, resulting in PCIe link down. 402 + * Since the PCIe controller driver is not handling link down currently, 403 + * the device becomes unusable. So we need to keep this workaround until 404 + * the link down handling is implemented in the controller driver. 405 + */ 399 406 ctx->wlan_gpio = devm_gpiod_get_optional(dev, "wlan-enable", 400 407 GPIOD_ASIS); 401 408 if (IS_ERR(ctx->wlan_gpio))