linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: qcom: sc7180: Make gpio28 non wakeup capable
@ 2020-06-15 12:42 Rajendra Nayak
  2020-06-20 21:03 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Rajendra Nayak @ 2020-06-15 12:42 UTC (permalink / raw)
  To: bjorn.andersson, agross, linus.walleij
  Cc: linux-arm-msm, linux-gpio, linux-kernel, mkshah, ilina, Rajendra Nayak

The PDC irqchip driver currently does not handle dual-edge interrupts,
and we have atleast one board with sc7180 designed to configure gpio28
as a dual-edge interrupt. This interrupt is however not expected to be
wakeup capable, so an easy way to fix this, seems to be to make this
gpio non wakeup capable and let TLMM handle it.

It would have been nice to be able to do this only for the particular
board with this design, however this change of removing gpio28 from the
pinctrl SoC file means we end up with one less wakeup capable gpio for
the entire SoC.

Reported-by: Jimmy Cheng-Yi Chiang <cychiang@google.com>
Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
---
 drivers/pinctrl/qcom/pinctrl-sc7180.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/qcom/pinctrl-sc7180.c b/drivers/pinctrl/qcom/pinctrl-sc7180.c
index 1b6465a..3afcc01 100644
--- a/drivers/pinctrl/qcom/pinctrl-sc7180.c
+++ b/drivers/pinctrl/qcom/pinctrl-sc7180.c
@@ -1122,7 +1122,7 @@ static const struct msm_pingroup sc7180_groups[] = {
 static const struct msm_gpio_wakeirq_map sc7180_pdc_map[] = {
 	{0, 40}, {3, 50}, {4, 42}, {5, 70}, {6, 41}, {9, 35},
 	{10, 80}, {11, 51}, {16, 20}, {21, 55}, {22, 90}, {23, 21},
-	{24, 61}, {26, 52}, {28, 36}, {30, 100}, {31, 33}, {32, 81},
+	{24, 61}, {26, 52}, {30, 100}, {31, 33}, {32, 81},
 	{33, 62}, {34, 43}, {36, 91}, {37, 53}, {38, 63}, {39, 72},
 	{41, 101}, {42, 7}, {43, 34}, {45, 73}, {47, 82}, {49, 17},
 	{52, 109}, {53, 102}, {55, 92}, {56, 56}, {57, 57}, {58, 83},
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] pinctrl: qcom: sc7180: Make gpio28 non wakeup capable
  2020-06-15 12:42 [PATCH] pinctrl: qcom: sc7180: Make gpio28 non wakeup capable Rajendra Nayak
@ 2020-06-20 21:03 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2020-06-20 21:03 UTC (permalink / raw)
  To: Rajendra Nayak
  Cc: Bjorn Andersson, Andy Gross, MSM, open list:GPIO SUBSYSTEM,
	linux-kernel, Maulik Shah, Lina Iyer

On Mon, Jun 15, 2020 at 2:42 PM Rajendra Nayak <rnayak@codeaurora.org> wrote:

> It would have been nice to be able to do this only for the particular
> board with this design, however this change of removing gpio28 from the
> pinctrl SoC file means we end up with one less wakeup capable gpio for
> the entire SoC.

Yeah but what about only removing it for this board in the driver then?

> @@ -1122,7 +1122,7 @@ static const struct msm_pingroup sc7180_groups[] = {
>  static const struct msm_gpio_wakeirq_map sc7180_pdc_map[] = {
>         {0, 40}, {3, 50}, {4, 42}, {5, 70}, {6, 41}, {9, 35},
>         {10, 80}, {11, 51}, {16, 20}, {21, 55}, {22, 90}, {23, 21},
> -       {24, 61}, {26, 52}, {28, 36}, {30, 100}, {31, 33}, {32, 81},
> +       {24, 61}, {26, 52}, {30, 100}, {31, 33}, {32, 81},
>         {33, 62}, {34, 43}, {36, 91}, {37, 53}, {38, 63}, {39, 72},
>         {41, 101}, {42, 7}, {43, 34}, {45, 73}, {47, 82}, {49, 17},
>         {52, 109}, {53, 102}, {55, 92}, {56, 56}, {57, 57}, {58, 83},

Make a copy of this tuple-array and in sc7180_pinctrl_probe()
set sc7180_pinctrl.wakeirq_map and .nwakeirq_map to something
board specific like that:

if (of_machine_is_compatible("my,board")) {
    sc7180_pinctrl..wakeirq_map = ... ;
}

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-20 21:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-15 12:42 [PATCH] pinctrl: qcom: sc7180: Make gpio28 non wakeup capable Rajendra Nayak
2020-06-20 21:03 ` 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).