From: David Vrabel <david.vrabel@csr.com>
To: Ohad Ben-Cohen <ohad@wizery.com>
Cc: linux-wireless@vger.kernel.org, linux-mmc@vger.kernel.org,
Luciano Coelho <luciano.coelho@nokia.com>,
akpm@linux-foundation.org, San Mehat <san@google.com>,
Roger Quadros <roger.quadros@nokia.com>,
Nicolas Pitre <nico@fluxnic.net>,
Gao Yunpeng <yunpeng.gao@intel.com>
Subject: Re: [PATCH v1 8/8] wireless: wl1271_sdio: enable Runtime PM
Date: Tue, 07 Sep 2010 14:02:10 +0100 [thread overview]
Message-ID: <4C8637D2.5070703@csr.com> (raw)
In-Reply-To: <1283858949-11073-9-git-send-email-ohad@wizery.com>
Ohad Ben-Cohen wrote:
> Enable runtime pm for the wl1271 SDIO device.
>
> We request power whenever the WLAN interface is brought up,
> and release it after the WLAN interface is taken down.
>
> As a result, power is released immediately after probe returns,
> since at that point power has not been explicitly requested yet
> (i.e. the WLAN interface is still down).
[...]
> @@ -233,6 +241,8 @@ static int __devinit wl1271_probe(struct sdio_func *func,
>
> sdio_set_drvdata(func, wl);
>
> + pm_runtime_put_noidle(&func->dev);
I find this a little odd and confusing as this is releasing the
reference taken by mmc core from inside the function driver.
Instead, I would suggest changing all existing SDIO function drivers to
call pm_runtime_get() in probe() and pm_runtime_put() in remove(). I
think this makes the runtime PM usage more obvious from a function
driver point of view.
> +
> wl1271_notice("initialized");
>
> return 0;
> @@ -255,6 +265,8 @@ static void __devexit wl1271_remove(struct sdio_func *func)
>
> wl1271_unregister_hw(wl);
> wl1271_free_hw(wl);
> +
> + pm_runtime_get_noresume(&func->dev);
> }
>
> static struct sdio_driver wl1271_sdio_driver = {
David
--
David Vrabel, Senior Software Engineer, Drivers
CSR, Churchill House, Cambridge Business Park, Tel: +44 (0)1223 692562
Cowley Road, Cambridge, CB4 0WZ http://www.csr.com/
Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
next prev parent reply other threads:[~2010-09-07 13:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-07 11:29 [PATCH v1 0/8] SDIO Runtime PM Support Ohad Ben-Cohen
2010-09-07 11:29 ` [PATCH v1 1/8] mmc: sdio: fully reconfigure oldcard on resume Ohad Ben-Cohen
2010-09-07 11:29 ` [PATCH v1 2/8] mmc: propagate power save/restore ops return value Ohad Ben-Cohen
2010-09-07 11:29 ` [PATCH v1 3/8] sdio: add power_restore support Ohad Ben-Cohen
2010-09-07 11:29 ` [PATCH v1 4/8] mmc: add general Runtime PM support Ohad Ben-Cohen
2010-09-07 11:29 ` [PATCH v1 5/8] sdio: add general runtime " Ohad Ben-Cohen
2010-09-07 11:29 ` [PATCH v1 6/8] sdio: enable Runtime PM for SDIO cards Ohad Ben-Cohen
2010-09-07 11:29 ` [PATCH v1 7/8] sdio: enable Runtime PM for SDIO functions Ohad Ben-Cohen
2010-09-14 19:27 ` Chris Ball
2010-09-14 19:32 ` Ohad Ben-Cohen
2010-09-07 11:29 ` [PATCH v1 8/8] wireless: wl1271_sdio: enable Runtime PM Ohad Ben-Cohen
2010-09-07 13:02 ` David Vrabel [this message]
2010-09-07 13:15 ` Ohad Ben-Cohen
2010-09-07 22:20 ` David Vrabel
2010-09-08 17:40 ` Luciano Coelho
2010-09-08 17:52 ` [PATCH v1 0/8] SDIO Runtime PM Support Luciano Coelho
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=4C8637D2.5070703@csr.com \
--to=david.vrabel@csr.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=luciano.coelho@nokia.com \
--cc=nico@fluxnic.net \
--cc=ohad@wizery.com \
--cc=roger.quadros@nokia.com \
--cc=san@google.com \
--cc=yunpeng.gao@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).