Re: [PATCH v2] can: Fix bug in suspend/resume

2014-11-14 Thread Marc Kleine-Budde
On 11/14/2014 04:20 PM, Sören Brinkmann wrote: Please look the at suspend/resume code and count the clock_enable/disable manually. After a suspend/resume cycle, you have enabled the clock twice, but disabled it once. I think you have to abstract the clock handling behind

Re: [PATCH v2] can: Fix bug in suspend/resume

2014-11-14 Thread Sören Brinkmann
On Fri, 2014-11-14 at 04:09PM +0100, Marc Kleine-Budde wrote: > On 11/14/2014 04:05 PM, Sören Brinkmann wrote: > > On Fri, 2014-11-14 at 09:54AM +0100, Marc Kleine-Budde wrote: > >> On 11/14/2014 09:16 AM, Kedareswara rao Appana wrote: > >>> The drvdata in the suspend/resume is of type struct

Re: [PATCH v2] can: Fix bug in suspend/resume

2014-11-14 Thread Marc Kleine-Budde
On 11/14/2014 04:05 PM, Sören Brinkmann wrote: > On Fri, 2014-11-14 at 09:54AM +0100, Marc Kleine-Budde wrote: >> On 11/14/2014 09:16 AM, Kedareswara rao Appana wrote: >>> The drvdata in the suspend/resume is of type struct net_device, >>> not the platform device.Enable the clocks in the suspend

Re: [PATCH v2] can: Fix bug in suspend/resume

2014-11-14 Thread Sören Brinkmann
On Fri, 2014-11-14 at 09:54AM +0100, Marc Kleine-Budde wrote: > On 11/14/2014 09:16 AM, Kedareswara rao Appana wrote: > > The drvdata in the suspend/resume is of type struct net_device, > > not the platform device.Enable the clocks in the suspend before > > accessing the registers of the CAN. > >

Re: [PATCH v2] can: Fix bug in suspend/resume

2014-11-14 Thread Marc Kleine-Budde
On 11/14/2014 09:16 AM, Kedareswara rao Appana wrote: > The drvdata in the suspend/resume is of type struct net_device, > not the platform device.Enable the clocks in the suspend before > accessing the registers of the CAN. > > Signed-off-by: Kedareswara rao Appana > --- > Changes for v2: > -

[PATCH v2] can: Fix bug in suspend/resume

2014-11-14 Thread Kedareswara rao Appana
The drvdata in the suspend/resume is of type struct net_device, not the platform device.Enable the clocks in the suspend before accessing the registers of the CAN. Signed-off-by: Kedareswara rao Appana --- Changes for v2: - Removed the struct platform_device* from suspend/resume as suggest

[PATCH v2] can: Fix bug in suspend/resume

2014-11-14 Thread Kedareswara rao Appana
The drvdata in the suspend/resume is of type struct net_device, not the platform device.Enable the clocks in the suspend before accessing the registers of the CAN. Signed-off-by: Kedareswara rao Appana appa...@xilinx.com --- Changes for v2: - Removed the struct platform_device* from

Re: [PATCH v2] can: Fix bug in suspend/resume

2014-11-14 Thread Marc Kleine-Budde
On 11/14/2014 09:16 AM, Kedareswara rao Appana wrote: The drvdata in the suspend/resume is of type struct net_device, not the platform device.Enable the clocks in the suspend before accessing the registers of the CAN. Signed-off-by: Kedareswara rao Appana appa...@xilinx.com --- Changes for

Re: [PATCH v2] can: Fix bug in suspend/resume

2014-11-14 Thread Sören Brinkmann
On Fri, 2014-11-14 at 09:54AM +0100, Marc Kleine-Budde wrote: On 11/14/2014 09:16 AM, Kedareswara rao Appana wrote: The drvdata in the suspend/resume is of type struct net_device, not the platform device.Enable the clocks in the suspend before accessing the registers of the CAN.

Re: [PATCH v2] can: Fix bug in suspend/resume

2014-11-14 Thread Marc Kleine-Budde
On 11/14/2014 04:05 PM, Sören Brinkmann wrote: On Fri, 2014-11-14 at 09:54AM +0100, Marc Kleine-Budde wrote: On 11/14/2014 09:16 AM, Kedareswara rao Appana wrote: The drvdata in the suspend/resume is of type struct net_device, not the platform device.Enable the clocks in the suspend before

Re: [PATCH v2] can: Fix bug in suspend/resume

2014-11-14 Thread Sören Brinkmann
On Fri, 2014-11-14 at 04:09PM +0100, Marc Kleine-Budde wrote: On 11/14/2014 04:05 PM, Sören Brinkmann wrote: On Fri, 2014-11-14 at 09:54AM +0100, Marc Kleine-Budde wrote: On 11/14/2014 09:16 AM, Kedareswara rao Appana wrote: The drvdata in the suspend/resume is of type struct net_device,

Re: [PATCH v2] can: Fix bug in suspend/resume

2014-11-14 Thread Marc Kleine-Budde
On 11/14/2014 04:20 PM, Sören Brinkmann wrote: Please look the at suspend/resume code and count the clock_enable/disable manually. After a suspend/resume cycle, you have enabled the clock twice, but disabled it once. I think you have to abstract the clock handling behind runtime PM. I