RE: [PATCH 1/1] irqchip: imx-gpcv2: Simplify the implemenation

2015-08-26 Thread Shenwei Wang
> -Original Message- > From: Thomas Gleixner [mailto:t...@linutronix.de] > > > > + > > > > if (sources) > > > > - *sources = imx_gpcv2_instance->wakeup_sources; > > > > + *sources = cd->wakeup_sources; > > > > > > > > return IMR_NUM; > > > > >

RE: [PATCH 1/1] irqchip: imx-gpcv2: Simplify the implemenation

2015-08-26 Thread Thomas Gleixner
On Wed, 26 Aug 2015, Shenwei Wang wrote: > > From: Thomas Gleixner [mailto:t...@linutronix.de] > > > + cd = imx_gpcv2_instance; > > > + if (!cd) > > > return 0; > > > > > > + for (i = 0; i < IMR_NUM; i++) { > > > + reg = cd->gpc_base + cd->cpu2wakeup + i * 4; > > > +

Re: [PATCH 1/1] irqchip: imx-gpcv2: Simplify the implemenation

2015-08-26 Thread Sudeep Holla
-kernel@vger.kernel.org; Huang Yongcai-B20788 Subject: Re: [PATCH 1/1] irqchip: imx-gpcv2: Simplify the implemenation typo in $subject Just noticed. Will change it. On 26/08/15 16:49, Shenwei Wang wrote: Based on Sudeep Holla's review comments, the implementation can be simplified by using the two

RE: [PATCH 1/1] irqchip: imx-gpcv2: Simplify the implemenation

2015-08-26 Thread Shenwei Wang
.kernel.org; Huang > Yongcai-B20788 > Subject: Re: [PATCH 1/1] irqchip: imx-gpcv2: Simplify the implemenation > > typo in $subject Just noticed. Will change it. > On 26/08/15 16:49, Shenwei Wang wrote: > > Based on Sudeep Holla's review comments, the implementation can b

RE: [PATCH 1/1] irqchip: imx-gpcv2: Simplify the implemenation

2015-08-26 Thread Shenwei Wang
g > Yongcai-B20788 > Subject: Re: [PATCH 1/1] irqchip: imx-gpcv2: Simplify the implemenation > > On Wed, 26 Aug 2015, Shenwei Wang wrote: > > u32 imx_gpcv2_get_wakeup_source(u32 **sources) { > > - if (!imx_gpcv2_instance) > > + struct gpcv2_irqchip_da

Re: [PATCH 1/1] irqchip: imx-gpcv2: Simplify the implemenation

2015-08-26 Thread Sudeep Holla
typo in $subject On 26/08/15 16:49, Shenwei Wang wrote: Based on Sudeep Holla's review comments, the implementation can be simplified by using the two flags: IRQCHIP_SKIP_SET_WAKE and IRQCHIP_MASK_ON_SUSPEND. This patch enables the flags in the struct irq_chip and removes the unnecessory

Re: [PATCH 1/1] irqchip: imx-gpcv2: Simplify the implemenation

2015-08-26 Thread Thomas Gleixner
On Wed, 26 Aug 2015, Shenwei Wang wrote: > u32 imx_gpcv2_get_wakeup_source(u32 **sources) > { > - if (!imx_gpcv2_instance) > + struct gpcv2_irqchip_data *cd; > + void __iomem *reg; > + int i; > + > + cd = imx_gpcv2_instance; > + if (!cd) > return 0; > > +

[PATCH 1/1] irqchip: imx-gpcv2: Simplify the implemenation

2015-08-26 Thread Shenwei Wang
Based on Sudeep Holla's review comments, the implementation can be simplified by using the two flags: IRQCHIP_SKIP_SET_WAKE and IRQCHIP_MASK_ON_SUSPEND. This patch enables the flags in the struct irq_chip and removes the unnecessory syscore_ops callbacks. Signed-off-by: Shenwei Wang ---

RE: [PATCH 1/1] irqchip: imx-gpcv2: Simplify the implemenation

2015-08-26 Thread Thomas Gleixner
On Wed, 26 Aug 2015, Shenwei Wang wrote: From: Thomas Gleixner [mailto:t...@linutronix.de] + cd = imx_gpcv2_instance; + if (!cd) return 0; + for (i = 0; i IMR_NUM; i++) { + reg = cd-gpc_base + cd-cpu2wakeup + i * 4; + cd-wakeup_sources[i] =

RE: [PATCH 1/1] irqchip: imx-gpcv2: Simplify the implemenation

2015-08-26 Thread Shenwei Wang
-Original Message- From: Thomas Gleixner [mailto:t...@linutronix.de] + if (sources) - *sources = imx_gpcv2_instance-wakeup_sources; + *sources = cd-wakeup_sources; return IMR_NUM; You do not need the intermediate

Re: [PATCH 1/1] irqchip: imx-gpcv2: Simplify the implemenation

2015-08-26 Thread Sudeep Holla
typo in $subject On 26/08/15 16:49, Shenwei Wang wrote: Based on Sudeep Holla's review comments, the implementation can be simplified by using the two flags: IRQCHIP_SKIP_SET_WAKE and IRQCHIP_MASK_ON_SUSPEND. This patch enables the flags in the struct irq_chip and removes the unnecessory

Re: [PATCH 1/1] irqchip: imx-gpcv2: Simplify the implemenation

2015-08-26 Thread Thomas Gleixner
On Wed, 26 Aug 2015, Shenwei Wang wrote: u32 imx_gpcv2_get_wakeup_source(u32 **sources) { - if (!imx_gpcv2_instance) + struct gpcv2_irqchip_data *cd; + void __iomem *reg; + int i; + + cd = imx_gpcv2_instance; + if (!cd) return 0; + for (i =

[PATCH 1/1] irqchip: imx-gpcv2: Simplify the implemenation

2015-08-26 Thread Shenwei Wang
Based on Sudeep Holla's review comments, the implementation can be simplified by using the two flags: IRQCHIP_SKIP_SET_WAKE and IRQCHIP_MASK_ON_SUSPEND. This patch enables the flags in the struct irq_chip and removes the unnecessory syscore_ops callbacks. Signed-off-by: Shenwei Wang

Re: [PATCH 1/1] irqchip: imx-gpcv2: Simplify the implemenation

2015-08-26 Thread Sudeep Holla
-kernel@vger.kernel.org; Huang Yongcai-B20788 Subject: Re: [PATCH 1/1] irqchip: imx-gpcv2: Simplify the implemenation typo in $subject Just noticed. Will change it. On 26/08/15 16:49, Shenwei Wang wrote: Based on Sudeep Holla's review comments, the implementation can be simplified by using the two

RE: [PATCH 1/1] irqchip: imx-gpcv2: Simplify the implemenation

2015-08-26 Thread Shenwei Wang
Subject: Re: [PATCH 1/1] irqchip: imx-gpcv2: Simplify the implemenation On Wed, 26 Aug 2015, Shenwei Wang wrote: u32 imx_gpcv2_get_wakeup_source(u32 **sources) { - if (!imx_gpcv2_instance) + struct gpcv2_irqchip_data *cd; + void __iomem *reg; + int i; + + cd

RE: [PATCH 1/1] irqchip: imx-gpcv2: Simplify the implemenation

2015-08-26 Thread Shenwei Wang
-B20788 Subject: Re: [PATCH 1/1] irqchip: imx-gpcv2: Simplify the implemenation typo in $subject Just noticed. Will change it. On 26/08/15 16:49, Shenwei Wang wrote: Based on Sudeep Holla's review comments, the implementation can be simplified by using the two flags: IRQCHIP_SKIP_SET_WAKE