pinctrl: mediatek: Implement pictrl irq wake handler
diff mbox

Message ID 1438162601-448-1-git-send-email-maoguang.meng@mediatek.com
State New
Headers show

Commit Message

maoguang.meng@mediatek.com July 29, 2015, 9:36 a.m. UTC
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(-)

Comments

Linus Walleij Aug. 10, 2015, 12:43 p.m. UTC | #1
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
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Hongzhou Yang Aug. 11, 2015, 1:51 a.m. UTC | #2
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

--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Daniel Kurtz Aug. 11, 2015, 7:50 a.m. UTC | #3
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/
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

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,
 };