Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933128AbbHYUQc (ORCPT ); Tue, 25 Aug 2015 16:16:32 -0400 Received: from www.linutronix.de ([62.245.132.108]:52482 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755416AbbHYUQb (ORCPT ); Tue, 25 Aug 2015 16:16:31 -0400 Date: Tue, 25 Aug 2015 22:15:59 +0200 (CEST) From: Thomas Gleixner To: Shenwei Wang cc: Sudeep Holla , "shawn.guo@linaro.org" , "jason@lakedaemon.net" , Huang Anson , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: RE: [PATCH v9 1/1] irqchip: imx-gpcv2: IMX GPCv2 driver for wakeup sources In-Reply-To: Message-ID: References: <1440443055-7291-1-git-send-email-shenwei.wang@freescale.com> <55DC3452.3070205@arm.com> <55DC738D.8000302@arm.com> <55DC7FA4.7040902@arm.com> <55DC96BA.2020905@arm.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1671 Lines: 45 On Tue, 25 Aug 2015, Shenwei Wang wrote: > > From: Thomas Gleixner [mailto:tglx@linutronix.de] > > > IRQCHIP_MASK_ON_SUSPEND flag is for the hardware that has no wakeup > > > source capability. This GPCv2 block is designed to manage the wakeup > > > source, so the flag does not make any sense. > > > > You have no seperate wakeup source mechanism. All you do is to mask all non > > wakeup sources and keep the wakeup sources unmask. > > > > That's what happens in gpcv2_wakeup_source_save() > > > > writel_relaxed(cd->wakeup_sources[i], reg); > > > > So it's the same as letting the core mask all non wakeup sources and leave the > > wakeup sources unmask. > > Does it mean an unexpected interrupt may activate the system, and > the core will let the system go into suspend again if the core > determines it not a wakeup source? The current design is to ignore > all the unexpected interrupts in the hardware level. Only the > presetting wakeup sources can activate the platform. Here power > consumption is more important. Did you actually read, what I wrote? The core does in case of MASK_ON_SUSPEND for_each_irq() { if (!irq->wakeupsource) mask(irq) } That's identical to what you are doing. You just do it differently by saving the active wakeup sources in your own data structure and then write that info to the mask register, which leaves only the wakeup sources unmasked. Thanks, tglx -- 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/