RE: [PATCH 3/3] GPIO: gpio-dwapb: Suspend & Resume PM enabling

2014-09-05 Thread Chen, Alvin
> >> > >> Insert this into the dynamically allocated per-port or chip struct instead. > >> > > How about the following? > > > > static struct dwapb_context { > > u32 data[DWAPB_MAX_PORTS]; > > u32 dir[DWAPB_MAX_PORTS]; > > u32 ext[DWAPB_MAX_PORTS]; > > u32 int_en; >

Re: [PATCH 3/3] GPIO: gpio-dwapb: Suspend & Resume PM enabling

2014-09-05 Thread Linus Walleij
On Fri, Sep 5, 2014 at 4:09 AM, Chen, Alvin wrote: >> > + unsigned long data; >> > + unsigned long dir; >> > + unsigned long int_en; >> > + unsigned long int_mask; >> > + unsigned long int_type; >> > + unsigned long int_pol; >> > + unsigned long int_deb;

Re: [PATCH 3/3] GPIO: gpio-dwapb: Suspend Resume PM enabling

2014-09-05 Thread Linus Walleij
On Fri, Sep 5, 2014 at 4:09 AM, Chen, Alvin alvin.c...@intel.com wrote: + unsigned long data; + unsigned long dir; + unsigned long int_en; + unsigned long int_mask; + unsigned long int_type; + unsigned long int_pol; + unsigned long int_deb;

RE: [PATCH 3/3] GPIO: gpio-dwapb: Suspend Resume PM enabling

2014-09-05 Thread Chen, Alvin
Insert this into the dynamically allocated per-port or chip struct instead. How about the following? static struct dwapb_context { u32 data[DWAPB_MAX_PORTS]; u32 dir[DWAPB_MAX_PORTS]; u32 ext[DWAPB_MAX_PORTS]; u32 int_en; u32 int_mask;

RE: [PATCH 3/3] GPIO: gpio-dwapb: Suspend & Resume PM enabling

2014-09-04 Thread Chen, Alvin
> > > +#if defined CONFIG_PM_SLEEP > > I wonder whether it's worth #ifdef:in out such things, it clutters the place. OK. I will use '#ifdef'. > > > +/* Store GPIO context across system-wide suspend/resume transitions > > +*/ static struct gpio_saved_regs { > > Call the struct: > > struct

Re: [PATCH 3/3] GPIO: gpio-dwapb: Suspend & Resume PM enabling

2014-09-04 Thread Linus Walleij
On Wed, Aug 27, 2014 at 7:46 PM, Weike Chen wrote: > This patch enables suspend and resume mode for the power management, and > it is based on Josef Ahmad's previous work. > > Reviewed-by: Hock Leong Kweh > Reviewed-by: Shevchenko, Andriy > Signed-off-by: Weike Chen (...) > +#if defined

RE: [PATCH 3/3] GPIO: gpio-dwapb: Suspend Resume PM enabling

2014-09-04 Thread Chen, Alvin
+#if defined CONFIG_PM_SLEEP I wonder whether it's worth #ifdef:in out such things, it clutters the place. OK. I will use '#ifdef'. +/* Store GPIO context across system-wide suspend/resume transitions +*/ static struct gpio_saved_regs { Call the struct: struct dwapb_context

Re: [PATCH 3/3] GPIO: gpio-dwapb: Suspend Resume PM enabling

2014-09-04 Thread Linus Walleij
On Wed, Aug 27, 2014 at 7:46 PM, Weike Chen alvin.c...@intel.com wrote: This patch enables suspend and resume mode for the power management, and it is based on Josef Ahmad's previous work. Reviewed-by: Hock Leong Kweh hock.leong.k...@intel.com Reviewed-by: Shevchenko, Andriy

RE: [PATCH 3/3] GPIO: gpio-dwapb: Suspend & Resume PM enabling

2014-08-31 Thread Chen, Alvin
> > +/* Store GPIO context across system-wide suspend/resume transitions > > +*/ static struct gpio_saved_regs { > > + unsigned long data; > > + unsigned long dir; > > + unsigned long int_en; > > + unsigned long int_mask; > > + unsigned long int_type; > > + unsigned long int_pol; > > +

RE: [PATCH 3/3] GPIO: gpio-dwapb: Suspend Resume PM enabling

2014-08-31 Thread Chen, Alvin
+/* Store GPIO context across system-wide suspend/resume transitions +*/ static struct gpio_saved_regs { + unsigned long data; + unsigned long dir; + unsigned long int_en; + unsigned long int_mask; + unsigned long int_type; + unsigned long int_pol; + unsigned long

Re: [PATCH 3/3] GPIO: gpio-dwapb: Suspend & Resume PM enabling

2014-08-28 Thread atull
On Wed, 27 Aug 2014, Weike Chen wrote: > This patch enables suspend and resume mode for the power management, and > it is based on Josef Ahmad's previous work. > > Reviewed-by: Hock Leong Kweh > Reviewed-by: Shevchenko, Andriy > Signed-off-by: Weike Chen > --- > drivers/gpio/gpio-dwapb.c |

Re: [PATCH 3/3] GPIO: gpio-dwapb: Suspend Resume PM enabling

2014-08-28 Thread atull
On Wed, 27 Aug 2014, Weike Chen wrote: This patch enables suspend and resume mode for the power management, and it is based on Josef Ahmad's previous work. Reviewed-by: Hock Leong Kweh hock.leong.k...@intel.com Reviewed-by: Shevchenko, Andriy andriy.shevche...@intel.com Signed-off-by:

RE: [PATCH 3/3] GPIO: gpio-dwapb: Suspend & Resume PM enabling

2014-08-27 Thread Chen, Alvin
> > Hi Weike, > > I tried out these patches on the current master branch (v3.17-rc2-9-g68e3702) > with a socfpga cyclone5 board. > > If I apply all 3 patches, the kernel doesn't boot. > > If I rebuild with only the first patch, I get only one gpio block showing up > (should > have 3 for this

Re: [PATCH 3/3] GPIO: gpio-dwapb: Suspend & Resume PM enabling

2014-08-27 Thread atull
On Wed, 27 Aug 2014, Weike Chen wrote: > This patch enables suspend and resume mode for the power management, and > it is based on Josef Ahmad's previous work. > > Reviewed-by: Hock Leong Kweh > Reviewed-by: Shevchenko, Andriy > Signed-off-by: Weike Chen > --- > drivers/gpio/gpio-dwapb.c |

Re: [PATCH 3/3] GPIO: gpio-dwapb: Suspend Resume PM enabling

2014-08-27 Thread atull
On Wed, 27 Aug 2014, Weike Chen wrote: This patch enables suspend and resume mode for the power management, and it is based on Josef Ahmad's previous work. Reviewed-by: Hock Leong Kweh hock.leong.k...@intel.com Reviewed-by: Shevchenko, Andriy andriy.shevche...@intel.com Signed-off-by:

RE: [PATCH 3/3] GPIO: gpio-dwapb: Suspend Resume PM enabling

2014-08-27 Thread Chen, Alvin
Hi Weike, I tried out these patches on the current master branch (v3.17-rc2-9-g68e3702) with a socfpga cyclone5 board. If I apply all 3 patches, the kernel doesn't boot. If I rebuild with only the first patch, I get only one gpio block showing up (should have 3 for this board) and