From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Kedareswara rao Appana <appana.durga.rao@xilinx.com>,
wg@grandegger.com, michal.simek@xilinx.com,
soren.brinkmann@xilinx.com, grant.likely@linaro.org,
robh+dt@kernel.org
Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
Kedareswara rao Appana <appanad@xilinx.com>
Subject: Re: [PATCH v2] can: Fix bug in suspend/resume
Date: Fri, 14 Nov 2014 09:54:37 +0100 [thread overview]
Message-ID: <5465C34D.4030805@pengutronix.de> (raw)
In-Reply-To: <e7070431858e49e29cd03d76fd7a66c3@BN1AFFO11FD055.protection.gbl>
[-- Attachment #1: Type: text/plain, Size: 1517 bytes --]
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 <appanad@xilinx.com>
> ---
> Changes for v2:
> - Removed the struct platform_device* from suspend/resume
> as suggest by Lothar.
> - The clocks are getting disabled and un prepared at the end of the probe.
> In the suspend the driver is doing a register write.In order
> To do that register write we have to again enable and prepare the clocks.
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
haven't done this myself yet, but the strong feeling that this is a
possible solution to your problem. These links might help:
http://lwn.net/Articles/505683/
http://www.slideshare.net/linaroorg/runtime-pm
http://www.slideshare.net/linaroorg/lca14-407-deployingruntimepmonarmsocs
http://www.slideshare.net/SamsungOSG/shuah-khan-lpcpmops
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: mkl@pengutronix.de (Marc Kleine-Budde)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] can: Fix bug in suspend/resume
Date: Fri, 14 Nov 2014 09:54:37 +0100 [thread overview]
Message-ID: <5465C34D.4030805@pengutronix.de> (raw)
In-Reply-To: <e7070431858e49e29cd03d76fd7a66c3@BN1AFFO11FD055.protection.gbl>
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 <appanad@xilinx.com>
> ---
> Changes for v2:
> - Removed the struct platform_device* from suspend/resume
> as suggest by Lothar.
> - The clocks are getting disabled and un prepared at the end of the probe.
> In the suspend the driver is doing a register write.In order
> To do that register write we have to again enable and prepare the clocks.
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
haven't done this myself yet, but the strong feeling that this is a
possible solution to your problem. These links might help:
http://lwn.net/Articles/505683/
http://www.slideshare.net/linaroorg/runtime-pm
http://www.slideshare.net/linaroorg/lca14-407-deployingruntimepmonarmsocs
http://www.slideshare.net/SamsungOSG/shuah-khan-lpcpmops
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141114/aed04c6b/attachment.sig>
next prev parent reply other threads:[~2014-11-14 8:54 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-14 8:16 [PATCH v2] can: Fix bug in suspend/resume Kedareswara rao Appana
2014-11-14 8:16 ` Kedareswara rao Appana
2014-11-14 8:16 ` Kedareswara rao Appana
2014-11-14 8:54 ` Marc Kleine-Budde [this message]
2014-11-14 8:54 ` Marc Kleine-Budde
2014-11-14 15:05 ` Sören Brinkmann
2014-11-14 15:05 ` Sören Brinkmann
2014-11-14 15:05 ` Sören Brinkmann
2014-11-14 15:09 ` Marc Kleine-Budde
2014-11-14 15:09 ` Marc Kleine-Budde
2014-11-14 15:20 ` Sören Brinkmann
2014-11-14 15:20 ` Sören Brinkmann
2014-11-14 15:20 ` Sören Brinkmann
2014-11-14 15:35 ` Marc Kleine-Budde
2014-11-14 15:35 ` Marc Kleine-Budde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5465C34D.4030805@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=appana.durga.rao@xilinx.com \
--cc=appanad@xilinx.com \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=netdev@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=soren.brinkmann@xilinx.com \
--cc=wg@grandegger.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.