[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <54662129.3020907@pengutronix.de>
Date: Fri, 14 Nov 2014 16:35:05 +0100
From: Marc Kleine-Budde <mkl@...gutronix.de>
To: Sören Brinkmann <soren.brinkmann@...inx.com>
CC: Kedareswara rao Appana <appana.durga.rao@...inx.com>,
wg@...ndegger.com, michal.simek@...inx.com,
grant.likely@...aro.org, robh+dt@...nel.org,
linux-can@...r.kernel.org, netdev@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org,
Kedareswara rao Appana <appanad@...inx.com>
Subject: Re: [PATCH v2] can: Fix bug in suspend/resume
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
>>>> haven't done this myself yet, but the strong feeling that this is a
>>>> possible solution to your problem. These links might help:
>>>
>>> I agree, the clock handling looks weird. Also the clk_disable calls in
>>> xcan_get_berr_counter() look suspicious to me, but I might be wrong.
>>> I think you can take a look at gpio-zynq for an example for runtime_pm
>>> usage. I think the usage model in that driver is similar to here.
>>
>> The xcan_get_berr_counter() function is correct, when doing manual (i.e.
>> non runtime-pm) clock handling. This function might be called if the
>> interface is down, this means clocks are disabled.
>
> I see, thanks for the clarification. Guess that should become
> pm_runtime_get_sync() and pm_runtime_put() when converting to
> runtime_pm.
Yes, as far as I understand runtime pm.
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 |
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists