[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CY1PR0301MB084365339B13A858A0B5AAC9838D0@CY1PR0301MB0843.namprd03.prod.outlook.com>
Date: Tue, 28 Jul 2015 15:14:01 +0000
From: Shenwei Wang <Shenwei.Wang@...escale.com>
To: Shawn Guo <shawnguo@...nel.org>
CC: "jason@...edaemon.net" <jason@...edaemon.net>,
Huang Anson <Anson.Huang@...escale.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"shawn.guo@...aro.org" <shawn.guo@...aro.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>
Subject: RE: [PATCH v6 2/2] ARM: imx: Add suspend codes for imx7D
> -----Original Message-----
> From: Shawn Guo [mailto:shawnguo@...nel.org]
> Sent: 2015年7月28日 9:31
> To: Wang Shenwei-B38339
> Cc: jason@...edaemon.net; Huang Yongcai-B20788;
> linux-kernel@...r.kernel.org; tglx@...utronix.de; shawn.guo@...aro.org;
> linux-arm-kernel@...ts.infradead.org
> Subject: Re: [PATCH v6 2/2] ARM: imx: Add suspend codes for imx7D
>
> On Tue, Jul 28, 2015 at 02:16:20PM +0000, Shenwei Wang wrote:
> > > The files are named with "-imx7". It's a clear sign that the build
> > > of the files should be controlled by something like related to "imx7".
> > > Ideally, it should be CONFIG_SOC_IMX7. Since imx7d is the only
> > > supported imx7 soc and there is no CONFIG_SOC_IMX7 available so far,
> > > it falls on CONFIG_SOC_IMX7D.
> >
> > We can also interpret "-imx7" is the first SoC which has the GPCv2 block.
>
> In that case you should name the block gpc-imx7d rather than gpcv2 and symbol
> as GPC_IMX7D rather than IMX_GPCV2.
I don't want to couple the gpcv2 driver with a SoC. Let's use your suggestion CONFIG_SOC_IMX7D
for now, because it introduce less modifications.
> > > > > > +extern struct imx_gpcv2_irq *gpcv2_irq_instance;
> > > > >
> > > > > Will this give a checkpatch warning?
> > > >
> > > > Yes. Any suggestion for that? Move it to a header file?
> > >
> > > Get rid of it.
> >
> > Then you may resolve the following compile error:
>
> You didn't get my point. Rather than defining it as a global variable, we should
> try to keep imx_gpcv2_irq as an internal data structure to irqchip driver, and use
> well-defined interface to access the data from pm driver when necessary.
Either to export a variable or a function, you will finally meet the same problem
:where to declare it? Otherwise the same compile error will happen too.
Regards,
Shenwei
> Shawn
>
> >
> > CC arch/arm/mach-imx/pm-imx7.o
> > arch/arm/mach-imx/pm-imx7.c: In function ‘imx_gpcv2_pm_init’:
> > arch/arm/mach-imx/pm-imx7.c:836:7: error: ‘gpcv2_irq_instance’ undeclared
> (first use in this function)
> > cd = gpcv2_irq_instance;
> > ^
> > arch/arm/mach-imx/pm-imx7.c:836:7: note: each undeclared identifier is
> > reported only once for each function it appears in
> > make[1]: *** [arch/arm/mach-imx/pm-imx7.o] Error 1
Download attachment "ULP1 3rd Party Tools Requirements.xlsx" of type "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" (19256 bytes)
Powered by blists - more mailing lists