mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Antonio Ospite <ospite@studenti.unina.it>
Cc: linux-wireless@vger.kernel.org, openezx-devel@lists.openezx.org,
	"John W . Linville" <linville@tuxdriver.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	linux-kernel@vger.kernel.org, Marek Vasut <marek.vasut@gmail.com>,
	Guiming Zhuo <gmzhuo@gmail.com>
Subject: Re: [PATCH v2] rfkill: Regulator consumer driver for rfkill
Date: Tue, 12 Apr 2011 13:41:28 +0200	[thread overview]
Message-ID: <1302608488.3639.15.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1302260395-11872-1-git-send-email-ospite@studenti.unina.it>

On Fri, 2011-04-08 at 12:59 +0200, Antonio Ospite wrote:
> Add a regulator consumer driver for rfkill to enable controlling radio
> transmitters connected to voltage regulators using the regulator
> framework.
> 
> A new "vrfkill" virtual supply is provided to use in platform code.
> 
> Signed-off-by: Guiming Zhuo <gmzhuo@gmail.com>
> Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
> ---
> 
> Changes since v1:
> 
>   - changed "voltage regulator" to "voltage regulators" in the commit
>     message
> 
>   - drop rfkill_init_sw_state() as requested by Johannes Berg
> 
>   - moved assignment fields of rfkill_data _before_ rfkill_register(),
>     as the latter will call .set_block (via schedule_work()) which would
>     find NULL pointers for the .vcc and .rf_kill fields otherwise.
> 
>     This issue was masked when I was using rfkill_init_sw_state() which
>     was setting the persistent flag: rfkill_register() does not call
>     schedule_work() immediately when the persistent flag is set.
> 
>     So please take another look at this part of rfkill_regulator_probe().
> 
> Mark, I left in the RFKILL || !RFKILL part.
> 
> If there are no more comments, who is going to merge the driver, Johannes?

I don't have a tree, John can merge it, but I found a few more bugs:

> + * static struct regulator_consumer_supply pcap_regulator_V6_consumers [] = {
> + * 	{ .dev_name = "rfkill-regulator.0", supply = "vrfkill" },
> + * };

It's a comment, but it should be .supply = (missing the .)

> +	if (pdata->name == NULL || pdata->type == 0) {
> +		dev_err(&pdev->dev, "invalid name or type in platform data\n");
> +		return -EINVAL;
> +	}
> +
> +	vcc = regulator_get_exclusive(&pdev->dev, "vrfkill");

Wasn't that supposed to use pdata->supply? Actually, there's no member
"supply" in the struct?

> +	dev_info(&pdev->dev, "initialized\n");

Is that message really useful?

Other than that, looks good to me.

johannes


  reply	other threads:[~2011-04-12 11:41 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-06  9:21 [PATCH] " Antonio Ospite
2011-04-06  9:29 ` Johannes Berg
2011-04-06 14:06   ` Antonio Ospite
2011-04-06 14:09     ` Johannes Berg
2011-04-06 14:24       ` Antonio Ospite
2011-04-06 14:50         ` Joey Lee
2011-04-08 10:59   ` [PATCH v2] " Antonio Ospite
2011-04-12 11:41     ` Johannes Berg [this message]
2011-04-12 11:44       ` Johannes Berg
2011-04-12 15:15         ` Mark Brown
2011-04-12 15:23           ` Johannes Berg
2011-04-13 16:53             ` Mark Brown
2011-04-13  8:44         ` Antonio Ospite
2011-04-13  9:19           ` Johannes Berg
2011-04-13 19:40             ` [PATCH v3] " Antonio Ospite
2011-04-13 19:53               ` Johannes Berg
2011-04-14 10:39                 ` Antonio Ospite
2011-04-14 13:06                   ` Mark Brown
2011-04-15 10:24                     ` Antonio Ospite
2011-04-13  8:53       ` [PATCH v2] " Antonio Ospite
2011-04-06 14:11 ` [PATCH] " Mark Brown
2011-04-06 14:21   ` Johannes Berg
2011-04-06 18:12     ` Paul Bolle
2011-04-06 18:38       ` John W. Linville
2011-04-06 20:10         ` Paul Bolle
2011-04-06 20:15           ` Johannes Berg
2011-04-06 20:17             ` Johannes Berg
2011-04-06 20:19               ` Johannes Berg
2011-04-06 18:46       ` Johannes Berg
2011-04-07 10:01         ` Bernd Petrovitsch
2011-04-07 10:09           ` Johannes Berg
2011-04-07 10:33             ` Bernd Petrovitsch
2011-04-07 10:42               ` depends on tristate logic (was: [PATCH] rfkill: Regulator consumer driver for rfkill) Johannes Berg
2011-04-06 14:29   ` [PATCH] rfkill: Regulator consumer driver for rfkill Antonio Ospite
2011-04-06 14:32     ` Johannes Berg

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=1302608488.3639.15.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=gmzhuo@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=marek.vasut@gmail.com \
    --cc=openezx-devel@lists.openezx.org \
    --cc=ospite@studenti.unina.it \
    /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

all inboxes | Powered by JetHome®