linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: mediatek: Implement pictrl irq wake handler
@ 2015-07-29  9:36 maoguang.meng
  2015-08-10 12:43 ` Linus Walleij
  0 siblings, 1 reply; 4+ messages in thread
From: maoguang.meng @ 2015-07-29  9:36 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Matthias Brugger, Hongzhou Yang, Yingjoe Chen, linux-gpio,
	linux-arm-kernel, linux-mediatek, linux-kernel, Maoguang Meng

From: Maoguang Meng <maoguang.meng@mediatek.com>

This patch implement irq_set_wake for suspend resume.

Signed-off-by: Maoguang Meng <maoguang.meng@mediatek.com>
---
 drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
index ad1ea16..a3d137e 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
@@ -1,7 +1,9 @@
 /*
  * mt65xx pinctrl driver based on Allwinner A1X pinctrl driver.
  * Copyright (c) 2014 MediaTek Inc.
- * Author: Hongzhou.Yang <hongzhou.yang@mediatek.com>
+ * Author:
+ *  Hongzhou.Yang <hongzhou.yang@mediatek.com>
+ *  Maoguang.Meng <maoguang.meng@mediatek.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -1062,6 +1064,16 @@ static int mtk_eint_set_type(struct irq_data *d,
 	return 0;
 }
 
+static int mtk_eint_irq_set_wake(struct irq_data *d, unsigned int on)
+{
+	if (on)
+		d->chip->flags |= IRQF_NO_SUSPEND;
+	else
+		d->chip->flags &= ~IRQF_NO_SUSPEND;
+
+	return 0;
+}
+
 static void mtk_eint_ack(struct irq_data *d)
 {
 	struct mtk_pinctrl *pctl = irq_data_get_irq_chip_data(d);
@@ -1075,11 +1087,13 @@ static void mtk_eint_ack(struct irq_data *d)
 }
 
 static struct irq_chip mtk_pinctrl_irq_chip = {
-	.name = "mt-eint",
+	.name = "mtk-eint",
+	.irq_disable = mtk_eint_mask,
 	.irq_mask = mtk_eint_mask,
 	.irq_unmask = mtk_eint_unmask,
 	.irq_ack = mtk_eint_ack,
 	.irq_set_type = mtk_eint_set_type,
+	.irq_set_wake = mtk_eint_irq_set_wake,
 	.irq_request_resources = mtk_pinctrl_irq_request_resources,
 	.irq_release_resources = mtk_pinctrl_irq_release_resources,
 };
-- 
1.8.1.1.dirty

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

* Re: [PATCH] pinctrl: mediatek: Implement pictrl irq wake handler
  2015-07-29  9:36 [PATCH] pinctrl: mediatek: Implement pictrl irq wake handler maoguang.meng
@ 2015-08-10 12:43 ` Linus Walleij
  2015-08-11  1:51   ` Hongzhou Yang
  0 siblings, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2015-08-10 12:43 UTC (permalink / raw)
  To: maoguang meng, Hongzhou Yang, Yingjoe Chen
  Cc: Matthias Brugger, linux-gpio@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-mediatek,
	linux-kernel@vger.kernel.org

On Wed, Jul 29, 2015 at 11:36 AM,  <maoguang.meng@mediatek.com> wrote:

> From: Maoguang Meng <maoguang.meng@mediatek.com>
>
> This patch implement irq_set_wake for suspend resume.
>
> Signed-off-by: Maoguang Meng <maoguang.meng@mediatek.com>

Hongzhou/Yingjoe: are you OK with this patch? Can I have your ACKs?

Yours,
Linus Walleij

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

* Re: [PATCH] pinctrl: mediatek: Implement pictrl irq wake handler
  2015-08-10 12:43 ` Linus Walleij
@ 2015-08-11  1:51   ` Hongzhou Yang
  2015-08-11  7:50     ` Daniel Kurtz
  0 siblings, 1 reply; 4+ messages in thread
From: Hongzhou Yang @ 2015-08-11  1:51 UTC (permalink / raw)
  To: Linus Walleij
  Cc: maoguang meng, Yingjoe Chen, Matthias Brugger,
	linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-mediatek, linux-kernel@vger.kernel.org

On Mon, 2015-08-10 at 14:43 +0200, Linus Walleij wrote:
> On Wed, Jul 29, 2015 at 11:36 AM,  <maoguang.meng@mediatek.com> wrote:
> 
> > From: Maoguang Meng <maoguang.meng@mediatek.com>
> >
> > This patch implement irq_set_wake for suspend resume.
> >
> > Signed-off-by: Maoguang Meng <maoguang.meng@mediatek.com>
> 
> Hongzhou/Yingjoe: are you OK with this patch? Can I have your ACKs?
> 
> Yours,
> Linus Walleij

Hi Linus,

Yes, you can. Thank you.

Acked-by: Hongzhou Yang <hongzhou.yang@mediatek.com>

Hongzhou


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

* Re: [PATCH] pinctrl: mediatek: Implement pictrl irq wake handler
  2015-08-11  1:51   ` Hongzhou Yang
@ 2015-08-11  7:50     ` Daniel Kurtz
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Kurtz @ 2015-08-11  7:50 UTC (permalink / raw)
  To: Hongzhou Yang
  Cc: Linus Walleij, maoguang meng, Yingjoe Chen, Matthias Brugger,
	linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-mediatek, linux-kernel@vger.kernel.org

On Tue, Aug 11, 2015 at 9:51 AM, Hongzhou Yang
<hongzhou.yang@mediatek.com> wrote:
> On Mon, 2015-08-10 at 14:43 +0200, Linus Walleij wrote:
>> On Wed, Jul 29, 2015 at 11:36 AM,  <maoguang.meng@mediatek.com> wrote:
>>
>> > From: Maoguang Meng <maoguang.meng@mediatek.com>
>> >
>> > This patch implement irq_set_wake for suspend resume.
>> >
>> > Signed-off-by: Maoguang Meng <maoguang.meng@mediatek.com>
>>
>> Hongzhou/Yingjoe: are you OK with this patch? Can I have your ACKs?
>>
>> Yours,
>> Linus Walleij
>
> Hi Linus,
>
> Yes, you can. Thank you.
>
> Acked-by: Hongzhou Yang <hongzhou.yang@mediatek.com>

NAK.

maoguang removes almost all of this patch in what I think is v2 of
this same patch:
https://patchwork.kernel.org/patch/6967441/

maoguang, please squash the two version of this patch together, and
upload a separate, correct patch.

-Dan

>
> Hongzhou
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

end of thread, other threads:[~2015-08-11  7:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-29  9:36 [PATCH] pinctrl: mediatek: Implement pictrl irq wake handler maoguang.meng
2015-08-10 12:43 ` Linus Walleij
2015-08-11  1:51   ` Hongzhou Yang
2015-08-11  7:50     ` Daniel Kurtz

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).