Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932703AbbHYOyu (ORCPT ); Tue, 25 Aug 2015 10:54:50 -0400 Received: from mail-bn1on0137.outbound.protection.outlook.com ([157.56.110.137]:3178 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751286AbbHYOys (ORCPT ); Tue, 25 Aug 2015 10:54:48 -0400 X-Greylist: delayed 2386 seconds by postgrey-1.27 at vger.kernel.org; Tue, 25 Aug 2015 10:54:48 EDT From: Shenwei Wang To: Sudeep Holla CC: "shawn.guo@linaro.org" , "tglx@linutronix.de" , "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 Thread-Topic: [PATCH v9 1/1] irqchip: imx-gpcv2: IMX GPCv2 driver for wakeup sources Thread-Index: AQHQ3p+6j6/hUiWpuEeJKYEULwppIZ4ccnUAgABCQ0CAAAkegIAAAI4ggAAN2wCAAADbcA== Date: Tue, 25 Aug 2015 14:54:41 +0000 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> In-Reply-To: <55DC7FA4.7040902@arm.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Shenwei.Wang@freescale.com; x-originating-ip: [192.88.168.50] x-microsoft-exchange-diagnostics: 1;BN3PR03MB1368;5:zQ/LZLBxH5O+tB8ex93/ctY3H4Fsj+ZjQo6/1w4L13KEt9Y9qu5ZUcQ/2VENeOVQPhpEWzxvk0rCISwl5/mCH1EL/hcxMafnJLVItsbOMLVaYDYKx52i4SJa/qfSM6ewLKo/yyz5m6MjB7SP/7EbIA==;24:AECEmuu666LM279NT8a9iUVxp1nVFFOCFNDyTxhZJvQOi/i9/t6TGXgBySho5U+PBZzn84nUK/aHGw4O7+vUWX5a93PWL6JIf13XwmUjogA=;20:3YqBS3gPIWzOCCx3QJgn5PHuT/QcWQZv2psJCY/a1D+q9YMbXgwISiZ5mQaq6H3POq0qiKztZ0/dMIh+9rjxIA== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR03MB1368; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(5005006)(8121501046)(3002001);SRVR:BN3PR03MB1368;BCL:0;PCL:0;RULEID:;SRVR:BN3PR03MB1368; x-forefront-prvs: 06793E740F x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(479174004)(13464003)(199003)(189002)(24454002)(5002640100001)(106356001)(81156007)(66066001)(46102003)(5007970100001)(2900100001)(5001860100001)(5003600100002)(5001830100001)(110136002)(189998001)(76176999)(54356999)(5001960100002)(101416001)(76576001)(64706001)(50986999)(10400500002)(97736004)(2950100001)(77156002)(68736005)(62966003)(92566002)(74316001)(99286002)(86362001)(106116001)(77096005)(4001540100001)(2656002)(5004730100002)(105586002)(102836002)(87936001)(122556002)(19580405001)(93886004)(19580395003)(40100003)(33656002);DIR:OUT;SFP:1102;SCL:1;SRVR:BN3PR03MB1368;H:CY1PR0301MB0843.namprd03.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:3;LANG:en; Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Aug 2015 14:54:41.5420 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB1368 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id t7PEstTo018693 Content-Length: 2379 Lines: 56 > -----Original Message----- > From: Sudeep Holla [mailto:sudeep.holla@arm.com] > Sent: 2015年8月25日 9:46 > To: Wang Shenwei-B38339 > Cc: Sudeep Holla; shawn.guo@linaro.org; tglx@linutronix.de; > jason@lakedaemon.net; Huang Yongcai-B20788; 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 > > > > On 25/08/15 15:14, Shenwei Wang wrote: > > > > > >> -----Original Message----- > >> From: Sudeep Holla [mailto:sudeep.holla@arm.com] > > [...] > > >> I don't see this driver doing anything extra apart from keeping the > >> wakeup irqs enabled. i.e. You use the same cpu*wake register to > >> mask/unmask the interrupt as well as set the wakeup source. Since the > >> wakeup interrupt will be enabled by the driver, you just need to mark > >> it as wake-up source and nothing extra in the controller right ? > >> If so, you need to set IRQCHIP_SKIP_SET_WAKE as you are just leaving > >> that irq enabled and not doing any extra configuration to enable it as wakeup > source. > >> Please correct if that wrong, but from the code that's what I could infer. > > > > There is no special for this driver. We just use the IRQCHIP driver > > framework to manage the wakeup sources. Why did you propose to set > > IRQCHIP_SKIP_SET_WAKE flag here? If you don't need the wakeup feature, > > you should just not enable this driver in the configuration. > > > > No, if the driver doesn't nothing extra to configure the wake up source other than > keeping it enabled, then it fits the case of SKIP_SET_WAKE. > The driver using this wake would have requested and enabled the irq. > When it calls enable_irq_wake, you have nothing extra to set(atleast from the > looks of the driver), so setting SKIP_SET_WAKE will skip the call and updated the > wake flags in irq core. > > I don't see the real need of 2 separate sets of irq mask being saved in either case. You don't really understand what happens after a driver calls enable_irq_wake. In suspend state, even the interrupt controller itself is powered off. How can you get the system up again by just using a SKIP_SET_WAKE. Regards, Shenwei > Regards, > Sudeep ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?