* [PATCH v2] power: sequencing: qcom-wcn: explain why we need the WLAN_EN GPIO hack
@ 2025-01-02 12:15 Bartosz Golaszewski
2025-01-13 8:14 ` Bartosz Golaszewski
0 siblings, 1 reply; 2+ messages in thread
From: Bartosz Golaszewski @ 2025-01-02 12:15 UTC (permalink / raw)
To: Manivannan Sadhasivam, Stephan Gerhold
Cc: linux-pm, linux-kernel, Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
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.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
Changes in v2:
- reword the FIXME comment as advised by Manivannan
drivers/power/sequencing/pwrseq-qcom-wcn.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/power/sequencing/pwrseq-qcom-wcn.c b/drivers/power/sequencing/pwrseq-qcom-wcn.c
index cc03b5aaa8f2..e8f5030f2639 100644
--- a/drivers/power/sequencing/pwrseq-qcom-wcn.c
+++ b/drivers/power/sequencing/pwrseq-qcom-wcn.c
@@ -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))
--
2.45.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] power: sequencing: qcom-wcn: explain why we need the WLAN_EN GPIO hack
2025-01-02 12:15 [PATCH v2] power: sequencing: qcom-wcn: explain why we need the WLAN_EN GPIO hack Bartosz Golaszewski
@ 2025-01-13 8:14 ` Bartosz Golaszewski
0 siblings, 0 replies; 2+ messages in thread
From: Bartosz Golaszewski @ 2025-01-13 8:14 UTC (permalink / raw)
To: Manivannan Sadhasivam, Stephan Gerhold, Bartosz Golaszewski
Cc: Bartosz Golaszewski, linux-pm, linux-kernel
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
On Thu, 02 Jan 2025 13:15:30 +0100, Bartosz Golaszewski wrote:
> 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.
>
> [...]
Applied, thanks!
[1/1] power: sequencing: qcom-wcn: explain why we need the WLAN_EN GPIO hack
commit: 29da3e8748f97dcf01498b00d42a3e7574ece80b
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-13 8:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-02 12:15 [PATCH v2] power: sequencing: qcom-wcn: explain why we need the WLAN_EN GPIO hack Bartosz Golaszewski
2025-01-13 8:14 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).