]> www.infradead.org Git - nvme.git/commitdiff
power: sequencing: qcom-wcn: explain why we need the WLAN_EN GPIO hack
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Thu, 2 Jan 2025 12:15:30 +0000 (13:15 +0100)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 13 Jan 2025 08:07:20 +0000 (09:07 +0100)
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>
drivers/power/sequencing/pwrseq-qcom-wcn.c

index cc03b5aaa8f2a7603450671a711756ffa3e543d2..e8f5030f2639a69254ad5efe0a313d2f3d10fa1d 100644 (file)
@@ -396,6 +396,13 @@ static int pwrseq_qcom_wcn_probe(struct platform_device *pdev)
                return dev_err_probe(dev, PTR_ERR(ctx->bt_gpio),
                                     "Failed to get the Bluetooth enable GPIO\n");
 
+       /*
+        * FIXME: This should actually be GPIOD_OUT_LOW, but doing so would
+        * cause the WLAN power to be toggled, resulting in PCIe link down.
+        * Since the PCIe controller driver is not handling link down currently,
+        * the device becomes unusable. So we need to keep this workaround until
+        * the link down handling is implemented in the controller driver.
+        */
        ctx->wlan_gpio = devm_gpiod_get_optional(dev, "wlan-enable",
                                                 GPIOD_ASIS);
        if (IS_ERR(ctx->wlan_gpio))