From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751542AbbIFKqD (ORCPT ); Sun, 6 Sep 2015 06:46:03 -0400 Received: from mailgw01.mediatek.com ([218.249.47.110]:41877 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1750995AbbIFKpx (ORCPT ); Sun, 6 Sep 2015 06:45:53 -0400 X-Greylist: delayed 315 seconds by postgrey-1.27 at vger.kernel.org; Sun, 06 Sep 2015 06:45:52 EDT X-Listener-Flag: 11101 Message-ID: <1441535972.22230.5.camel@mhfsdcap03> Subject: Re: [PATCH v4] pinctrl: mediatek: Implement wake handler and suspend resume From: maoguang meng To: Sudeep Holla , Daniel Kurtz CC: Linus Walleij , Hongzhou Yang , "linux-kernel@vger.kernel.org" , "linux-gpio@vger.kernel.org" , "linux-mediatek@lists.infradead.org" , Matthias Brugger , Yingjoe Chen , "linux-arm-kernel@lists.infradead.org" Date: Sun, 6 Sep 2015 18:39:32 +0800 In-Reply-To: References: <1439541486-22203-1-git-send-email-maoguang.meng@mediatek.com> <55DB4609.5040904@arm.com> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2015-09-02 at 14:02 +0800, Daniel Kurtz wrote: > Hi maoguang, > > On Tue, Aug 25, 2015 at 12:27 AM, Sudeep Holla wrote: > > > > > > On 14/08/15 09:38, maoguang.meng@mediatek.com wrote: > >> > >> From: Maoguang Meng > >> > >> This patch implement irq_set_wake to get who is wakeup source and > >> setup on suspend resume. > >> > >> Signed-off-by: Maoguang Meng > >> > [snip] > > Can you please respond to Sudeep's questions: > > > Does this pinmux controller: > > > > 1. Support wake-up configuration ? If not, you need to use > > IRQCHIP_SKIP_SET_WAKE. I don't see any value in writing the > > mask_{set,clear} if the same registers are used for {en,dis}able YES. we can call enable_irq_wake(irq) to config this irq as a wake-up source. > > > > 2. Is in always on domain ? If not, you need save/restore only to > > resume back the functionality. Generally we can set > > IRQCHIP_MASK_ON_SUSPEND to ensure non-wake-up interrupts are > > disabled during suspend and re-enabled in resume path. You just > > save/restore raw values without tracking the wake-up source. YES. > > > > Also I see that no care is taken to set the port irq as wake enable > > source. It may work with current mainline, but won't with -next. Please > > ensure the port irq to the parent interrupt controller remains > > enabled(i.e set as wake). As you know, we do not care the port irq as wake enbale source, when enter suspend we think no matter what the port irq is enabled/disabled which are not affected as a wake-up source, Because eint has a line to receive SPM. For example,after suspend,press power key(use eint5) will generate an electrical signal which is send to spm by eint. and then spm wake cpu. > > > > Regards, > > Sudeep Regards, Maoguang