linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grazvydas Ignotas <notasas@gmail.com>
To: Ohad Ben-Cohen <ohad@wizery.com>
Cc: linux-wireless@vger.kernel.org, Kalle Valo <kvalo@adurom.com>,
	"John W. Linville" <linville@tuxdriver.com>
Subject: Re: [PATCH 2/3] wl1251: add runtime PM support for SDIO
Date: Thu, 4 Nov 2010 16:37:44 +0200	[thread overview]
Message-ID: <AANLkTik0tawXfer2DMSKFXZwFbjYWLoG3nRBYMAMO8WL@mail.gmail.com> (raw)
In-Reply-To: <AANLkTimfXO9r=DTW3CAiVswmsoKES2qxEiYz4JBOTGu_@mail.gmail.com>

On Thu, Nov 4, 2010 at 3:51 PM, Ohad Ben-Cohen <ohad@wizery.com> wrote:
> On Wed, Nov 3, 2010 at 6:13 PM, Grazvydas Ignotas <notasas@gmail.com> wrote:
>> Add runtime PM support, similar to how it's done for wl1271.
>> This allows to power down the card when the driver is loaded but
>> network is not in use.
>>
>> CC: Ohad Ben-Cohen <ohad@wizery.com>
>> Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
>> ---
>>  drivers/net/wireless/wl1251/sdio.c |   62 ++++++++++++++++++++++++++++++++++--
>>  1 files changed, 59 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/wireless/wl1251/sdio.c b/drivers/net/wireless/wl1251/sdio.c
>> index 0285190..0a5db21 100644
>> --- a/drivers/net/wireless/wl1251/sdio.c
>> +++ b/drivers/net/wireless/wl1251/sdio.c
>> @@ -26,6 +26,7 @@
>>  #include <linux/platform_device.h>
>>  #include <linux/wl12xx.h>
>>  #include <linux/irq.h>
>> +#include <linux/pm_runtime.h>
>>
>>  #include "wl1251.h"
>>
>> @@ -173,10 +174,36 @@ static void wl1251_disable_line_irq(struct wl1251 *wl)
>>
>>  static int wl1251_sdio_set_power(struct wl1251 *wl, bool enable)
>>  {
>> -       if (wl->set_power)
>> -               wl->set_power(enable);
>> +       struct sdio_func *func = wl_to_func(wl);
>> +       int ret;
>>
>> -       return 0;
>> +       if (enable) {
>> +               /* Power up the card */
>> +               if (wl->set_power)
>> +                       wl->set_power(true);
>
> Why do you still need that ->set_power() handler ?

On pandora besides power, we also have a GPIO to control clock buffer
for wl1251, so I thought I could enable it here. Perhaps it could be
set up as regulator too, but I'm not sure how to set it up so that
clock is enabled before main power. Also it's not really a power
supply so it somehow felt wrong to set up regulator for it.

  reply	other threads:[~2010-11-04 14:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-03 22:13 [PATCH 0/3] wl1251 SDIO patches Grazvydas Ignotas
2010-11-03 22:13 ` [PATCH 1/3] wl1251: add power callback to wl1251_if_operations Grazvydas Ignotas
2010-11-07 10:15   ` Kalle Valo
2010-11-03 22:13 ` [PATCH 2/3] wl1251: add runtime PM support for SDIO Grazvydas Ignotas
2010-11-04 13:51   ` Ohad Ben-Cohen
2010-11-04 14:37     ` Grazvydas Ignotas [this message]
2010-11-04 22:04       ` Ohad Ben-Cohen
2010-11-07 10:20         ` Kalle Valo
2010-11-07 10:23           ` Ohad Ben-Cohen
2010-11-07 10:18   ` Kalle Valo
2010-11-07 10:25     ` Ohad Ben-Cohen
2010-11-07 10:31       ` Kalle Valo
2010-11-08 13:26         ` Grazvydas Ignotas
2010-11-03 22:13 ` [PATCH 3/3] wl1251: use wl12xx_platform_data to pass data Grazvydas Ignotas
2010-11-07 10:28   ` Kalle Valo
2010-11-08  9:14     ` Luciano Coelho
2010-11-08 15:19       ` Tony Lindgren

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=AANLkTik0tawXfer2DMSKFXZwFbjYWLoG3nRBYMAMO8WL@mail.gmail.com \
    --to=notasas@gmail.com \
    --cc=kvalo@adurom.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=ohad@wizery.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).