All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
Cc: Kedareswara rao Appana <appana.durga.rao@xilinx.com>,
	wg@grandegger.com, michal.simek@xilinx.com,
	grant.likely@linaro.org, linux-can@vger.kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Kedareswara rao Appana <appanad@xilinx.com>
Subject: Re: [PATCH v4] can: Convert to runtime_pm
Date: Wed, 07 Jan 2015 17:30:11 +0100	[thread overview]
Message-ID: <54AD5F13.1020107@pengutronix.de> (raw)
In-Reply-To: <a868331b44ce4b2a80b572399530f1f9@BN1BFFO11FD043.protection.gbl>

[-- Attachment #1: Type: text/plain, Size: 1290 bytes --]

On 01/07/2015 04:58 PM, Sören Brinkmann wrote:
>> I think you have to convert the _remove() function, too. Have a look at
>> the gpio-zynq.c driver:
>>
>>> static int zynq_gpio_remove(struct platform_device *pdev)
>>> {
>>> 	struct zynq_gpio *gpio = platform_get_drvdata(pdev);
>>>
>>> 	pm_runtime_get_sync(&pdev->dev);
>>
>> However I don't understand why the get_sync() is here. Maybe Sören can help?
> 
> IIRC, the concern was that the remove function may be called while the device is
> runtime suspended. Hence the remove function needs to resume the device since the
> remove function may access the HW.

What about the corresponding runtime_put()? Would some counter be
unbalanced upon device removal?

Without having tested it, unloading and loading, i.e. reloading a CAN
driver is easier than reloading the gpio driver on an average embedded
system. Kedareswara please test your driver with something like:
modprobe; ifconfig up; cansend; ifconfig down; rmmod in a loop.

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 --]

  reply	other threads:[~2015-01-07 16:30 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-23 12:25 [PATCH v4] can: Convert to runtime_pm Kedareswara rao Appana
2014-12-23 12:25 ` Kedareswara rao Appana
2014-12-23 22:43 ` Sören Brinkmann
2014-12-23 22:43   ` Sören Brinkmann
     [not found] ` <20141223224308.GC4611@xsjandreislx>
2015-01-06  6:23   ` Appana Durga Kedareswara Rao
2015-01-06  6:23     ` Appana Durga Kedareswara Rao
2015-01-06  6:23     ` Appana Durga Kedareswara Rao
2015-01-06 11:25     ` Marc Kleine-Budde
2015-01-07 12:28 ` Marc Kleine-Budde
2015-01-07 15:58   ` Sören Brinkmann
2015-01-07 15:58     ` Sören Brinkmann
2015-01-07 16:30     ` Marc Kleine-Budde [this message]
2015-01-07 16:32       ` Sören Brinkmann
2015-01-07 16:32         ` Sören Brinkmann
2015-01-07 16:36         ` Marc Kleine-Budde
2015-01-11  5:34   ` Appana Durga Kedareswara Rao
2015-01-11  5:34     ` Appana Durga Kedareswara Rao
2015-01-11 15:41     ` Marc Kleine-Budde
2015-01-12  6:59       ` Appana Durga Kedareswara Rao
2015-01-12  6:59         ` Appana Durga Kedareswara Rao
2015-01-12 13:25         ` Marc Kleine-Budde
2015-01-12 13:49           ` Appana Durga Kedareswara Rao
2015-01-12 13:49             ` Appana Durga Kedareswara Rao
2015-01-12 13:53             ` Marc Kleine-Budde
2015-01-12 15:04               ` Appana Durga Kedareswara Rao
2015-01-12 15:04                 ` Appana Durga Kedareswara Rao
     [not found] <1419337510-6284-1-git-send-email-appanad@xilinx.com>
2014-12-23 12:27 ` Appana Durga Kedareswara Rao
  -- strict thread matches above, loose matches on Subject: below --
2014-12-23 12:22 Kedareswara rao Appana

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=54AD5F13.1020107@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=appana.durga.rao@xilinx.com \
    --cc=appanad@xilinx.com \
    --cc=grant.likely@linaro.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=netdev@vger.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.