* [PATCH] pinctrl: qcom: sdm845: Enable dual edge errata
@ 2021-11-02 3:41 Bjorn Andersson
2021-11-02 6:29 ` Stephen Boyd
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Bjorn Andersson @ 2021-11-02 3:41 UTC (permalink / raw)
To: Linus Walleij
Cc: Stephen Boyd, Douglas Anderson, linux-arm-msm, linux-gpio,
linux-kernel, Steev Klimaszewski
It has been observed that dual edge triggered wakeirq GPIOs on SDM845
doesn't trigger interrupts on the falling edge.
Enabling wakeirq_dual_edge_errata for SDM845 indicates that the PDC in
SDM845 suffers from the same problem described, and worked around, by
Doug in 'c3c0c2e18d94 ("pinctrl: qcom: Handle broken/missing PDC dual
edge IRQs on sc7180")', so enable the workaround for SDM845 as well.
The specific problem seen without this is that gpio-keys does not detect
the falling edge of the LID gpio on the Lenovo Yoga C630 and as such
consistently reports the LID as closed.
Fixes: e35a6ae0eb3a ("pinctrl/msm: Setup GPIO chip in hierarchy")
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
drivers/pinctrl/qcom/pinctrl-sdm845.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pinctrl/qcom/pinctrl-sdm845.c b/drivers/pinctrl/qcom/pinctrl-sdm845.c
index c51793f6546f..fdfd7b8f3a76 100644
--- a/drivers/pinctrl/qcom/pinctrl-sdm845.c
+++ b/drivers/pinctrl/qcom/pinctrl-sdm845.c
@@ -1310,6 +1310,7 @@ static const struct msm_pinctrl_soc_data sdm845_pinctrl = {
.ngpios = 151,
.wakeirq_map = sdm845_pdc_map,
.nwakeirq_map = ARRAY_SIZE(sdm845_pdc_map),
+ .wakeirq_dual_edge_errata = true,
};
static const struct msm_pinctrl_soc_data sdm845_acpi_pinctrl = {
--
2.32.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] pinctrl: qcom: sdm845: Enable dual edge errata
2021-11-02 3:41 [PATCH] pinctrl: qcom: sdm845: Enable dual edge errata Bjorn Andersson
@ 2021-11-02 6:29 ` Stephen Boyd
2021-11-02 13:38 ` Doug Anderson
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Stephen Boyd @ 2021-11-02 6:29 UTC (permalink / raw)
To: Bjorn Andersson, Linus Walleij
Cc: Douglas Anderson, linux-arm-msm, linux-gpio, linux-kernel,
Steev Klimaszewski
Quoting Bjorn Andersson (2021-11-01 20:41:15)
> It has been observed that dual edge triggered wakeirq GPIOs on SDM845
> doesn't trigger interrupts on the falling edge.
>
> Enabling wakeirq_dual_edge_errata for SDM845 indicates that the PDC in
> SDM845 suffers from the same problem described, and worked around, by
> Doug in 'c3c0c2e18d94 ("pinctrl: qcom: Handle broken/missing PDC dual
> edge IRQs on sc7180")', so enable the workaround for SDM845 as well.
>
> The specific problem seen without this is that gpio-keys does not detect
> the falling edge of the LID gpio on the Lenovo Yoga C630 and as such
> consistently reports the LID as closed.
>
> Fixes: e35a6ae0eb3a ("pinctrl/msm: Setup GPIO chip in hierarchy")
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] pinctrl: qcom: sdm845: Enable dual edge errata
2021-11-02 3:41 [PATCH] pinctrl: qcom: sdm845: Enable dual edge errata Bjorn Andersson
2021-11-02 6:29 ` Stephen Boyd
@ 2021-11-02 13:38 ` Doug Anderson
2021-11-02 16:35 ` Steev Klimaszewski
2021-11-09 11:08 ` Linus Walleij
3 siblings, 0 replies; 5+ messages in thread
From: Doug Anderson @ 2021-11-02 13:38 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Linus Walleij, Stephen Boyd, linux-arm-msm, linux-gpio,
linux-kernel, Steev Klimaszewski
Hi,
On Mon, Nov 1, 2021 at 8:41 PM Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:
>
> It has been observed that dual edge triggered wakeirq GPIOs on SDM845
> doesn't trigger interrupts on the falling edge.
>
> Enabling wakeirq_dual_edge_errata for SDM845 indicates that the PDC in
> SDM845 suffers from the same problem described, and worked around, by
> Doug in 'c3c0c2e18d94 ("pinctrl: qcom: Handle broken/missing PDC dual
> edge IRQs on sc7180")', so enable the workaround for SDM845 as well.
>
> The specific problem seen without this is that gpio-keys does not detect
> the falling edge of the LID gpio on the Lenovo Yoga C630 and as such
> consistently reports the LID as closed.
>
> Fixes: e35a6ae0eb3a ("pinctrl/msm: Setup GPIO chip in hierarchy")
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
> drivers/pinctrl/qcom/pinctrl-sdm845.c | 1 +
> 1 file changed, 1 insertion(+)
Reviewed-by: Douglas Anderson <dianders@chromium.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] pinctrl: qcom: sdm845: Enable dual edge errata
2021-11-02 3:41 [PATCH] pinctrl: qcom: sdm845: Enable dual edge errata Bjorn Andersson
2021-11-02 6:29 ` Stephen Boyd
2021-11-02 13:38 ` Doug Anderson
@ 2021-11-02 16:35 ` Steev Klimaszewski
2021-11-09 11:08 ` Linus Walleij
3 siblings, 0 replies; 5+ messages in thread
From: Steev Klimaszewski @ 2021-11-02 16:35 UTC (permalink / raw)
To: Bjorn Andersson, Linus Walleij
Cc: Stephen Boyd, Douglas Anderson, linux-arm-msm, linux-gpio, linux-kernel
On 11/1/21 10:41 PM, Bjorn Andersson wrote:
> It has been observed that dual edge triggered wakeirq GPIOs on SDM845
> doesn't trigger interrupts on the falling edge.
>
> Enabling wakeirq_dual_edge_errata for SDM845 indicates that the PDC in
> SDM845 suffers from the same problem described, and worked around, by
> Doug in 'c3c0c2e18d94 ("pinctrl: qcom: Handle broken/missing PDC dual
> edge IRQs on sc7180")', so enable the workaround for SDM845 as well.
>
> The specific problem seen without this is that gpio-keys does not detect
> the falling edge of the LID gpio on the Lenovo Yoga C630 and as such
> consistently reports the LID as closed.
>
> Fixes: e35a6ae0eb3a ("pinctrl/msm: Setup GPIO chip in hierarchy")
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
> drivers/pinctrl/qcom/pinctrl-sdm845.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pinctrl/qcom/pinctrl-sdm845.c b/drivers/pinctrl/qcom/pinctrl-sdm845.c
> index c51793f6546f..fdfd7b8f3a76 100644
> --- a/drivers/pinctrl/qcom/pinctrl-sdm845.c
> +++ b/drivers/pinctrl/qcom/pinctrl-sdm845.c
> @@ -1310,6 +1310,7 @@ static const struct msm_pinctrl_soc_data sdm845_pinctrl = {
> .ngpios = 151,
> .wakeirq_map = sdm845_pdc_map,
> .nwakeirq_map = ARRAY_SIZE(sdm845_pdc_map),
> + .wakeirq_dual_edge_errata = true,
> };
>
> static const struct msm_pinctrl_soc_data sdm845_acpi_pinctrl = {
Tested here with a number of suspend cycles, works as expected now.
Thank you so much!
Tested-By: Steev Klimaszewski <steev@kali.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] pinctrl: qcom: sdm845: Enable dual edge errata
2021-11-02 3:41 [PATCH] pinctrl: qcom: sdm845: Enable dual edge errata Bjorn Andersson
` (2 preceding siblings ...)
2021-11-02 16:35 ` Steev Klimaszewski
@ 2021-11-09 11:08 ` Linus Walleij
3 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2021-11-09 11:08 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Stephen Boyd, Douglas Anderson, linux-arm-msm, linux-gpio,
linux-kernel, Steev Klimaszewski
On Tue, Nov 2, 2021 at 4:41 AM Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:
> It has been observed that dual edge triggered wakeirq GPIOs on SDM845
> doesn't trigger interrupts on the falling edge.
>
> Enabling wakeirq_dual_edge_errata for SDM845 indicates that the PDC in
> SDM845 suffers from the same problem described, and worked around, by
> Doug in 'c3c0c2e18d94 ("pinctrl: qcom: Handle broken/missing PDC dual
> edge IRQs on sc7180")', so enable the workaround for SDM845 as well.
>
> The specific problem seen without this is that gpio-keys does not detect
> the falling edge of the LID gpio on the Lenovo Yoga C630 and as such
> consistently reports the LID as closed.
>
> Fixes: e35a6ae0eb3a ("pinctrl/msm: Setup GPIO chip in hierarchy")
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Patch applied for fixes!
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-11-09 11:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-02 3:41 [PATCH] pinctrl: qcom: sdm845: Enable dual edge errata Bjorn Andersson
2021-11-02 6:29 ` Stephen Boyd
2021-11-02 13:38 ` Doug Anderson
2021-11-02 16:35 ` Steev Klimaszewski
2021-11-09 11:08 ` Linus Walleij
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).