Re: [PATCH] rfkill: Regulator consumer driver for rfkill

2011-04-06 Thread Johannes Berg
On Wed, 2011-04-06 at 11:21 +0200, Antonio Ospite wrote: + if (regulator_is_enabled(vcc)) { + dev_dbg(pdev-dev, Regulator already enabled\n); + rfkill_data-reg_enabled = 1; + } + rfkill_init_sw_state(rf_kill, !rfkill_data-reg_enabled); + + ret =

Re: [PATCH] rfkill: Regulator consumer driver for rfkill

2011-04-06 Thread Johannes Berg
On Wed, 2011-04-06 at 16:06 +0200, Antonio Ospite wrote: + if (regulator_is_enabled(vcc)) { + dev_dbg(pdev-dev, Regulator already enabled\n); + rfkill_data-reg_enabled = 1; + } + rfkill_init_sw_state(rf_kill, !rfkill_data-reg_enabled); + + ret =

Re: [PATCH] rfkill: Regulator consumer driver for rfkill

2011-04-06 Thread Johannes Berg
On Wed, 2011-04-06 at 23:11 +0900, Mark Brown wrote: On Wed, Apr 06, 2011 at 11:21:19AM +0200, Antonio Ospite wrote: + tristate Generic rfkill regulator driver + depends on RFKILL || !RFKILL That looks *odd*. That's normal for rfkill -- if RFKILL==n then this can be anything since

Re: [PATCH] rfkill: Regulator consumer driver for rfkill

2011-04-06 Thread Johannes Berg
On Wed, 2011-04-06 at 16:29 +0200, Antonio Ospite wrote: On Wed, 6 Apr 2011 23:11:33 +0900 Mark Brown broo...@opensource.wolfsonmicro.com wrote: On Wed, Apr 06, 2011 at 11:21:19AM +0200, Antonio Ospite wrote: + tristate Generic rfkill regulator driver + depends on RFKILL || !RFKILL

Re: [PATCH] rfkill: Regulator consumer driver for rfkill

2011-04-06 Thread Johannes Berg
On Wed, 2011-04-06 at 20:12 +0200, Paul Bolle wrote: On Wed, 2011-04-06 at 16:21 +0200, Johannes Berg wrote: On Wed, 2011-04-06 at 23:11 +0900, Mark Brown wrote: On Wed, Apr 06, 2011 at 11:21:19AM +0200, Antonio Ospite wrote: + tristate Generic rfkill regulator driver

Re: [PATCH] rfkill: Regulator consumer driver for rfkill

2011-04-06 Thread Johannes Berg
On Wed, 2011-04-06 at 22:10 +0200, Paul Bolle wrote: On Wed, 2011-04-06 at 14:38 -0400, John W. Linville wrote: The syntax may seem strange, It does! but basically it just says don't let me by y if RFKILL is m ... but, besides that, I can be any value. So in effect it's shorthand for

Re: [PATCH] rfkill: Regulator consumer driver for rfkill

2011-04-06 Thread Johannes Berg
On Wed, 2011-04-06 at 22:15 +0200, Johannes Berg wrote: On Wed, 2011-04-06 at 22:10 +0200, Paul Bolle wrote: On Wed, 2011-04-06 at 14:38 -0400, John W. Linville wrote: The syntax may seem strange, It does! but basically it just says don't let me by y if RFKILL is m

Re: [PATCH] rfkill: Regulator consumer driver for rfkill

2011-04-06 Thread Johannes Berg
On Wed, 2011-04-06 at 22:17 +0200, Johannes Berg wrote: On Wed, 2011-04-06 at 22:15 +0200, Johannes Berg wrote: On Wed, 2011-04-06 at 22:10 +0200, Paul Bolle wrote: On Wed, 2011-04-06 at 14:38 -0400, John W. Linville wrote: The syntax may seem strange, It does

Re: [PATCH v2] rfkill: Regulator consumer driver for rfkill

2011-04-12 Thread Johannes Berg
-by: Guiming Zhuo gmz...@gmail.com Signed-off-by: Antonio Ospite osp...@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

Re: [PATCH v2] rfkill: Regulator consumer driver for rfkill

2011-04-12 Thread Johannes Berg
On Tue, 2011-04-12 at 13:41 +0200, Johannes Berg wrote: + * 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

Re: [PATCH v2] rfkill: Regulator consumer driver for rfkill

2011-04-12 Thread Johannes Berg
On Tue, 2011-04-12 at 08:15 -0700, Mark Brown wrote: On Tue, Apr 12, 2011 at 01:44:02PM +0200, Johannes Berg wrote: On Tue, 2011-04-12 at 13:41 +0200, Johannes Berg wrote: + if (pdata-name == NULL || pdata-type == 0) { + dev_err(pdev-dev, invalid name or type