Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753744AbbG0OuV (ORCPT ); Mon, 27 Jul 2015 10:50:21 -0400 Received: from mail-bl2on0105.outbound.protection.outlook.com ([65.55.169.105]:2016 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752407AbbG0OuU (ORCPT ); Mon, 27 Jul 2015 10:50:20 -0400 From: Shenwei Wang To: Shawn Guo CC: "jason@lakedaemon.net" , Huang Anson , "linux-kernel@vger.kernel.org" , "tglx@linutronix.de" , "shawn.guo@linaro.org" , "linux-arm-kernel@lists.infradead.org" Subject: RE: [PATCH v6 1/2] irqchip: imx-gpcv2: IMX GPCv2 driver for wakeup sources Thread-Topic: [PATCH v6 1/2] irqchip: imx-gpcv2: IMX GPCv2 driver for wakeup sources Thread-Index: AQHQxKFBE7T9qugVyk2pPJOxP2xAkJ3vWnoAgAAFd/CAAAmzgIAAAPnw Date: Mon, 27 Jul 2015 14:50:15 +0000 Message-ID: References: <1437584859-64203-1-git-send-email-shenwei.wang@freescale.com> <1437584859-64203-2-git-send-email-shenwei.wang@freescale.com> <20150727134058.GL12927@tiger> <20150727143515.GQ12927@tiger> In-Reply-To: <20150727143515.GQ12927@tiger> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: kernel.org; dkim=none (message not signed) header.d=none; x-originating-ip: [192.88.168.50] x-microsoft-exchange-diagnostics: 1;CY1PR03MB1376;5:Rgs7OUekkKELgBoULDwKMgwmb+Ag5PmAl/Exg4KwglwfXujXPm6NA4OwzZeYaOQNGrDLoTalPCzqds0DwD4RS4XxR/vsY6J6m91+gklNjIzz6I7RpFQSZU6fYkyKvqR/ONFKAUxOVGtJyUaf+Qw2aw==;24:t7WzkJfuPgSlFtZWBgaHduro4xChVTdmlwJ/YjsPfmUXQJBVgf6quu/YuboRIKN6c/ZTZuXqQhqqfAPPpDyZ3fcRM6n1Qe9Ko+SbEMSpI6o=;20:VbxC9eaMMRnrz8XFfORS0Gp1AOb/vsu4vgqVHpqTMFKQFRNkbFGiVI52rEiiJlcTqNsJ+QOgeq3IN5L4c12oxA== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR03MB1376; cy1pr03mb1376: X-MS-Exchange-Organization-RulesExecuted x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:CY1PR03MB1376;BCL:0;PCL:0;RULEID:;SRVR:CY1PR03MB1376; x-forefront-prvs: 0650714AAA x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(13464003)(164054003)(2950100001)(76576001)(40100003)(110136002)(2656002)(87936001)(19580405001)(86362001)(77156002)(62966003)(46102003)(106116001)(19580395003)(92566002)(77096005)(33656002)(66066001)(5002640100001)(102836002)(5003600100002)(93886004)(99286002)(189998001)(54356999)(76176999)(74316001)(50986999);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR03MB1376;H:CY1PR0301MB0843.namprd03.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jul 2015 14:50:15.9877 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR03MB1376 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 t6REoPwk009779 Content-Length: 1935 Lines: 46 > -----Original Message----- > From: Shawn Guo [mailto:shawnguo@kernel.org] > Sent: 2015年7月27日 9:35 > To: Wang Shenwei-B38339 > Cc: jason@lakedaemon.net; Huang Yongcai-B20788; > linux-kernel@vger.kernel.org; tglx@linutronix.de; shawn.guo@linaro.org; > linux-arm-kernel@lists.infradead.org > Subject: Re: [PATCH v6 1/2] irqchip: imx-gpcv2: IMX GPCv2 driver for wakeup > sources > > > On Wed, Jul 22, 2015 at 12:07:38PM -0500, Shenwei Wang wrote: > > > > diff --git a/include/soc/imx/gpcv2.h b/include/soc/imx/gpcv2.h new > > > > file mode 100644 index 0000000..73d6e75 > > > > --- /dev/null > > > > +++ b/include/soc/imx/gpcv2.h > > > > > > I do not like this header, which couples imx7d irqchip and pm driver > > > so much. Can you please elaborate why we have to have this header? > > > > PM driver does depend on the irqchip driver. It needs some input like > > enabled irqs and wakeup irqs to decide which module to be powered off > > in low power states. I am also considering if the header file could be > > removed or not. So far it seems a common place to define a structure which is > used in both drivers is still required. > > Please be more specific. Trimming the header down to the macros and > structures/fields that are necessary to be in the header might be a good idea. > And then we can go through them one by one to see if there is a way to avoid > them being in the header. The following structure is currently used in both drivers. The members "gpc_base/ wakeup_sources/enabled_irqs" are now shared to PM driver. And the macro IMR_NUM will be referred by both drivers too. struct imx_gpcv2_irq { spinlock_t lock; void __iomem *gpc_base; u32 wakeup_sources[IMR_NUM]; u32 enabled_irqs[IMR_NUM]; u32 cpu2wakeup; }; Thanks, Shenwei > Shawn ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?