Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755230AbbG1AsC (ORCPT ); Mon, 27 Jul 2015 20:48:02 -0400 Received: from mail.kernel.org ([198.145.29.136]:57675 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754552AbbG1AsA (ORCPT ); Mon, 27 Jul 2015 20:48:00 -0400 Date: Tue, 28 Jul 2015 08:47:47 +0800 From: Shawn Guo To: Shenwei Wang 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 Message-ID: <20150728004746.GT12927@tiger> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1224 Lines: 35 On Mon, Jul 27, 2015 at 02:50:15PM +0000, Shenwei Wang wrote: > 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; So this is the virtual base used by both irqchip and pm driver, and the lock is for register access protection, right? If so, we can define gpc as a syscon device, and access it from both drivers with regmap. > u32 wakeup_sources[IMR_NUM]; This should be an irqchip internal data and exported to external users like pm code with an interface like imx_gpcv2_get_wakeup_sources(). > u32 enabled_irqs[IMR_NUM]; I do not see how this is used in pm driver. > u32 cpu2wakeup; The only use of this in pm driver is to unmask interrupt #32 during initialization. Why cannot it be done in irqchip driver initialization? Shawn > }; -- 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/