RE: [PATCH v8 1/2] irqchip: imx-gpcv2: IMX GPCv2 driver for wakeup sources

2015-08-24 Thread Thomas Gleixner
On Mon, 24 Aug 2015, Shenwei Wang wrote: > > That's what you want achieve. Still you save the full content of the > > registers and > > restore the full content. That saves/restores the enabled and disabled > > interrupts. > > So enabled_irqs is a misnomer as you save the full state. > > How

RE: [PATCH v8 1/2] irqchip: imx-gpcv2: IMX GPCv2 driver for wakeup sources

2015-08-24 Thread Shenwei Wang
> -Original Message- > From: Thomas Gleixner [mailto:t...@linutronix.de] > > > > +static int gpcv2_wakeup_source_save(void) { > > > > + struct gpcv2_irqchip_data *cd; > > > > + void __iomem *reg; > > > > + int i; > > > > + > > > > + cd = imx_gpcv2_instance; > > >

RE: [PATCH v8 1/2] irqchip: imx-gpcv2: IMX GPCv2 driver for wakeup sources

2015-08-24 Thread Thomas Gleixner
On Mon, 24 Aug 2015, Shenwei Wang wrote: > > > +static int gpcv2_wakeup_source_save(void) { > > > + struct gpcv2_irqchip_data *cd; > > > + void __iomem *reg; > > > + int i; > > > + > > > + cd = imx_gpcv2_instance; > > > + if (!cd) > > > + return 0; > > > + > > > + for (i = 0; i < IMR_NUM;

RE: [PATCH v8 1/2] irqchip: imx-gpcv2: IMX GPCv2 driver for wakeup sources

2015-08-24 Thread Shenwei Wang
> Subject: Re: [PATCH v8 1/2] irqchip: imx-gpcv2: IMX GPCv2 driver for wakeup > sources > > On Fri, 31 Jul 2015, Shenwei Wang wrote: > > +struct gpcv2_irqchip_data { > > + struct raw_spinlock rlock; > > + void __iomem *gpc_base; > > + u32 wakeup_sources

RE: [PATCH v8 1/2] irqchip: imx-gpcv2: IMX GPCv2 driver for wakeup sources

2015-08-24 Thread Shenwei Wang
] irqchip: imx-gpcv2: IMX GPCv2 driver for wakeup sources On Fri, 31 Jul 2015, Shenwei Wang wrote: +struct gpcv2_irqchip_data { + struct raw_spinlock rlock; + void __iomem *gpc_base; + u32 wakeup_sources[IMR_NUM]; + u32 enabled_irqs[IMR_NUM]; + u32 cpu2wakeup; Can you

RE: [PATCH v8 1/2] irqchip: imx-gpcv2: IMX GPCv2 driver for wakeup sources

2015-08-24 Thread Thomas Gleixner
On Mon, 24 Aug 2015, Shenwei Wang wrote: +static int gpcv2_wakeup_source_save(void) { + struct gpcv2_irqchip_data *cd; + void __iomem *reg; + int i; + + cd = imx_gpcv2_instance; + if (!cd) + return 0; + + for (i = 0; i IMR_NUM; i++) { + reg =

RE: [PATCH v8 1/2] irqchip: imx-gpcv2: IMX GPCv2 driver for wakeup sources

2015-08-24 Thread Thomas Gleixner
On Mon, 24 Aug 2015, Shenwei Wang wrote: That's what you want achieve. Still you save the full content of the registers and restore the full content. That saves/restores the enabled and disabled interrupts. So enabled_irqs is a misnomer as you save the full state. How about change

RE: [PATCH v8 1/2] irqchip: imx-gpcv2: IMX GPCv2 driver for wakeup sources

2015-08-24 Thread Shenwei Wang
-Original Message- From: Thomas Gleixner [mailto:t...@linutronix.de] +static int gpcv2_wakeup_source_save(void) { + struct gpcv2_irqchip_data *cd; + void __iomem *reg; + int i; + + cd = imx_gpcv2_instance; + if (!cd) +

Re: [PATCH v8 1/2] irqchip: imx-gpcv2: IMX GPCv2 driver for wakeup sources

2015-08-23 Thread Thomas Gleixner
On Fri, 31 Jul 2015, Shenwei Wang wrote: > +struct gpcv2_irqchip_data { > + struct raw_spinlock rlock; > + void __iomem *gpc_base; > + u32 wakeup_sources[IMR_NUM]; > + u32 enabled_irqs[IMR_NUM]; > + u32 cpu2wakeup; Can you please format that in a readable way? struct

Re: [PATCH v8 1/2] irqchip: imx-gpcv2: IMX GPCv2 driver for wakeup sources

2015-08-23 Thread Thomas Gleixner
On Fri, 31 Jul 2015, Shenwei Wang wrote: +struct gpcv2_irqchip_data { + struct raw_spinlock rlock; + void __iomem *gpc_base; + u32 wakeup_sources[IMR_NUM]; + u32 enabled_irqs[IMR_NUM]; + u32 cpu2wakeup; Can you please format that in a readable way? struct

RE: [PATCH v8 1/2] irqchip: imx-gpcv2: IMX GPCv2 driver for wakeup sources

2015-08-21 Thread Shenwei Wang
Ping. Shenwei > -Original Message- > From: linux-kernel-ow...@vger.kernel.org > [mailto:linux-kernel-ow...@vger.kernel.org] On Behalf Of Shenwei Wang > Sent: 2015年7月31日 16:34 > To: shawn@linaro.org; t...@linutronix.de; ja...@lakedaemon.net > Cc: linux-arm-ker...@lists.infradead.org;

RE: [PATCH v8 1/2] irqchip: imx-gpcv2: IMX GPCv2 driver for wakeup sources

2015-08-21 Thread Shenwei Wang
Ping. Shenwei -Original Message- From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel-ow...@vger.kernel.org] On Behalf Of Shenwei Wang Sent: 2015年7月31日 16:34 To: shawn@linaro.org; t...@linutronix.de; ja...@lakedaemon.net Cc: linux-arm-ker...@lists.infradead.org;