* [PATCH] ARM: pxa: fix regulator related build fail in magician_defconfig @ 2012-03-06 19:46 Paul Gortmaker 2012-03-06 20:01 ` Mark Brown 0 siblings, 1 reply; 16+ messages in thread From: Paul Gortmaker @ 2012-03-06 19:46 UTC (permalink / raw) To: linux-arm-kernel commit 737f360d5bef5e01c6cfa755dca0b449a154c1e0 (linux-next) "regulator: Remove support for supplies specified by struct device" deletes the field from the struct, but this platform was still trying to set those fields. Delete the assignments. arch/arm/mach-pxa/magician.c:581: error: unknown field 'dev' specified in initializer arch/arm/mach-pxa/magician.c:581: warning: initialization from incompatible pointer type arch/arm/mach-pxa/magician.c:585: error: unknown field 'dev' specified in initializer arch/arm/mach-pxa/magician.c:585: warning: initialization from incompatible pointer type arch/arm/mach-pxa/hx4700.c:683: error: unknown field 'dev' specified in initializer arch/arm/mach-pxa/hx4700.c:683: warning: initialization from incompatible pointer type arch/arm/mach-pxa/hx4700.c:687: error: unknown field 'dev' specified in initializer arch/arm/mach-pxa/hx4700.c:687: warning: initialization from incompatible pointer type Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c index f2c23ea..76de30c 100644 --- a/arch/arm/mach-pxa/hx4700.c +++ b/arch/arm/mach-pxa/hx4700.c @@ -680,11 +680,9 @@ static struct platform_device power_supply = { static struct regulator_consumer_supply bq24022_consumers[] = { { - .dev = &gpio_vbus.dev, .supply = "vbus_draw", }, { - .dev = &power_supply.dev, .supply = "ac_draw", }, }; diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c index 3d6baf9..bd0f86a 100644 --- a/arch/arm/mach-pxa/magician.c +++ b/arch/arm/mach-pxa/magician.c @@ -578,11 +578,9 @@ static struct platform_device power_supply = { static struct regulator_consumer_supply bq24022_consumers[] = { { - .dev = &gpio_vbus.dev, .supply = "vbus_draw", }, { - .dev = &power_supply.dev, .supply = "ac_draw", }, }; -- 1.7.9.1 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH] ARM: pxa: fix regulator related build fail in magician_defconfig 2012-03-06 19:46 [PATCH] ARM: pxa: fix regulator related build fail in magician_defconfig Paul Gortmaker @ 2012-03-06 20:01 ` Mark Brown 2012-03-06 20:49 ` [PATCH v2] " Paul Gortmaker 0 siblings, 1 reply; 16+ messages in thread From: Mark Brown @ 2012-03-06 20:01 UTC (permalink / raw) To: linux-arm-kernel On Tue, Mar 06, 2012 at 02:46:43PM -0500, Paul Gortmaker wrote: > static struct regulator_consumer_supply bq24022_consumers[] = { > { > - .dev = &gpio_vbus.dev, > .supply = "vbus_draw", No, this isn't a good fix - it will break the user. You need to replace dev with the equivalent dev_name. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120306/b2636232/attachment.sig> ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2] ARM: pxa: fix regulator related build fail in magician_defconfig 2012-03-06 20:01 ` Mark Brown @ 2012-03-06 20:49 ` Paul Gortmaker 2012-03-07 1:46 ` Paul Parsons 0 siblings, 1 reply; 16+ messages in thread From: Paul Gortmaker @ 2012-03-06 20:49 UTC (permalink / raw) To: linux-arm-kernel commit 737f360d5bef5e01c6cfa755dca0b449a154c1e0 (linux-next) "regulator: Remove support for supplies specified by struct device" deletes the field from the struct, but this platform was still trying to set those fields. Convert them to use the REGULATOR_SUPPLY macro so as to fix this failure: arch/arm/mach-pxa/magician.c:581: error: unknown field 'dev' specified in initializer arch/arm/mach-pxa/magician.c:581: warning: initialization from incompatible pointer type arch/arm/mach-pxa/magician.c:585: error: unknown field 'dev' specified in initializer arch/arm/mach-pxa/magician.c:585: warning: initialization from incompatible pointer type arch/arm/mach-pxa/hx4700.c:683: error: unknown field 'dev' specified in initializer arch/arm/mach-pxa/hx4700.c:683: warning: initialization from incompatible pointer type arch/arm/mach-pxa/hx4700.c:687: error: unknown field 'dev' specified in initializer arch/arm/mach-pxa/hx4700.c:687: warning: initialization from incompatible pointer type Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> --- [v2: convert to using REGULATOR_SUPPLY instead of just deleting the instances of setting the .dev field ] diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c index f2c23ea..53c3366 100644 --- a/arch/arm/mach-pxa/hx4700.c +++ b/arch/arm/mach-pxa/hx4700.c @@ -679,14 +679,8 @@ static struct platform_device power_supply = { */ static struct regulator_consumer_supply bq24022_consumers[] = { - { - .dev = &gpio_vbus.dev, - .supply = "vbus_draw", - }, - { - .dev = &power_supply.dev, - .supply = "ac_draw", - }, + REGULATOR_SUPPLY("vbus_draw", "gpio_vbus"), + REGULATOR_SUPPLY("ac_draw", "power_supply"), }; static struct regulator_init_data bq24022_init_data = { diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c index 3d6baf9..71a3a3d 100644 --- a/arch/arm/mach-pxa/magician.c +++ b/arch/arm/mach-pxa/magician.c @@ -577,14 +577,8 @@ static struct platform_device power_supply = { */ static struct regulator_consumer_supply bq24022_consumers[] = { - { - .dev = &gpio_vbus.dev, - .supply = "vbus_draw", - }, - { - .dev = &power_supply.dev, - .supply = "ac_draw", - }, + REGULATOR_SUPPLY("vbus_draw", "gpio_vbus"), + REGULATOR_SUPPLY("ac_draw", "power_supply"), }; static struct regulator_init_data bq24022_init_data = { -- 1.7.9.1 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2] ARM: pxa: fix regulator related build fail in magician_defconfig 2012-03-06 20:49 ` [PATCH v2] " Paul Gortmaker @ 2012-03-07 1:46 ` Paul Parsons 2012-03-07 14:46 ` Paul Gortmaker 2012-03-08 21:34 ` [PATCH] " Paul Gortmaker 0 siblings, 2 replies; 16+ messages in thread From: Paul Parsons @ 2012-03-07 1:46 UTC (permalink / raw) To: linux-arm-kernel --- On Tue, 6/3/12, Paul Gortmaker <paul.gortmaker@windriver.com> wrote: > commit > 737f360d5bef5e01c6cfa755dca0b449a154c1e0 (linux-next) > > ? "regulator: Remove support for supplies specified by > struct device" > > deletes the field from the struct, but this platform was > still trying > to set those fields.? Convert them to use the > REGULATOR_SUPPLY macro > so as to fix this failure: > > arch/arm/mach-pxa/magician.c:581: error: unknown field 'dev' > specified in initializer > arch/arm/mach-pxa/magician.c:581: warning: initialization > from incompatible pointer type > arch/arm/mach-pxa/magician.c:585: error: unknown field 'dev' > specified in initializer > arch/arm/mach-pxa/magician.c:585: warning: initialization > from incompatible pointer type > > arch/arm/mach-pxa/hx4700.c:683: error: unknown field 'dev' > specified in initializer > arch/arm/mach-pxa/hx4700.c:683: warning: initialization from > incompatible pointer type > arch/arm/mach-pxa/hx4700.c:687: error: unknown field 'dev' > specified in initializer > arch/arm/mach-pxa/hx4700.c:687: warning: initialization from > incompatible pointer type > > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> > --- > > [v2: convert to using REGULATOR_SUPPLY instead of just > deleting the > instances of setting the .dev field ] > > diff --git a/arch/arm/mach-pxa/hx4700.c > b/arch/arm/mach-pxa/hx4700.c > index f2c23ea..53c3366 100644 > --- a/arch/arm/mach-pxa/hx4700.c > +++ b/arch/arm/mach-pxa/hx4700.c > @@ -679,14 +679,8 @@ static struct platform_device > power_supply = { > ? */ > > static struct regulator_consumer_supply bq24022_consumers[] > = { > -??? { > -??? ??? .dev = > &gpio_vbus.dev, > -??? ??? .supply = > "vbus_draw", > -??? }, > -??? { > -??? ??? .dev = > &power_supply.dev, > -??? ??? .supply = "ac_draw", > -??? }, > +??? REGULATOR_SUPPLY("vbus_draw", > "gpio_vbus"), > +??? REGULATOR_SUPPLY("ac_draw", > "power_supply"), > }; The above hx4700 patch yields the following warnings: _regulator_get: gpio-vbus supply vbus_draw not found, using dummy regulator _regulator_get: pda-power supply ac_draw not found, using dummy regulator I suggest the following lines instead: REGULATOR_SUPPLY("vbus_draw", "gpio-vbus"), REGULATOR_SUPPLY("ac_draw", "pda-power"), ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2] ARM: pxa: fix regulator related build fail in magician_defconfig 2012-03-07 1:46 ` Paul Parsons @ 2012-03-07 14:46 ` Paul Gortmaker 2012-03-07 14:57 ` Mark Brown 2012-03-08 21:34 ` [PATCH] " Paul Gortmaker 1 sibling, 1 reply; 16+ messages in thread From: Paul Gortmaker @ 2012-03-07 14:46 UTC (permalink / raw) To: linux-arm-kernel On 12-03-06 08:46 PM, Paul Parsons wrote: > --- On Tue, 6/3/12, Paul Gortmaker <paul.gortmaker@windriver.com> wrote: >> commit >> 737f360d5bef5e01c6cfa755dca0b449a154c1e0 (linux-next) >> >> "regulator: Remove support for supplies specified by >> struct device" >> >> deletes the field from the struct, but this platform was >> still trying >> to set those fields. Convert them to use the >> REGULATOR_SUPPLY macro >> so as to fix this failure: >> >> arch/arm/mach-pxa/magician.c:581: error: unknown field 'dev' >> specified in initializer >> arch/arm/mach-pxa/magician.c:581: warning: initialization >> from incompatible pointer type >> arch/arm/mach-pxa/magician.c:585: error: unknown field 'dev' >> specified in initializer >> arch/arm/mach-pxa/magician.c:585: warning: initialization >> from incompatible pointer type >> >> arch/arm/mach-pxa/hx4700.c:683: error: unknown field 'dev' >> specified in initializer >> arch/arm/mach-pxa/hx4700.c:683: warning: initialization from >> incompatible pointer type >> arch/arm/mach-pxa/hx4700.c:687: error: unknown field 'dev' >> specified in initializer >> arch/arm/mach-pxa/hx4700.c:687: warning: initialization from >> incompatible pointer type >> >> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> >> --- >> >> [v2: convert to using REGULATOR_SUPPLY instead of just >> deleting the >> instances of setting the .dev field ] >> >> diff --git a/arch/arm/mach-pxa/hx4700.c >> b/arch/arm/mach-pxa/hx4700.c >> index f2c23ea..53c3366 100644 >> --- a/arch/arm/mach-pxa/hx4700.c >> +++ b/arch/arm/mach-pxa/hx4700.c >> @@ -679,14 +679,8 @@ static struct platform_device >> power_supply = { >> */ >> >> static struct regulator_consumer_supply bq24022_consumers[] >> = { >> - { >> - .dev = >> &gpio_vbus.dev, >> - .supply = >> "vbus_draw", >> - }, >> - { >> - .dev = >> &power_supply.dev, >> - .supply = "ac_draw", >> - }, >> + REGULATOR_SUPPLY("vbus_draw", >> "gpio_vbus"), >> + REGULATOR_SUPPLY("ac_draw", >> "power_supply"), >> }; > > The above hx4700 patch yields the following warnings: > > _regulator_get: gpio-vbus supply vbus_draw not found, using dummy regulator > _regulator_get: pda-power supply ac_draw not found, using dummy regulator > > I suggest the following lines instead: > > REGULATOR_SUPPLY("vbus_draw", "gpio-vbus"), > REGULATOR_SUPPLY("ac_draw", "pda-power"), Thanks for the report. The regulator code is rather foreign to me, but I think I figured out the expectations on the names last night when looking at a similar patch here: http://www.spinics.net/lists/arm-kernel/msg163418.html I'll fix these two patches up, but next time I'll just report the regulator regressions and let the sub-system maintainer or the platform maintainer sort them out. Paul. > ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2] ARM: pxa: fix regulator related build fail in magician_defconfig 2012-03-07 14:46 ` Paul Gortmaker @ 2012-03-07 14:57 ` Mark Brown 0 siblings, 0 replies; 16+ messages in thread From: Mark Brown @ 2012-03-07 14:57 UTC (permalink / raw) To: linux-arm-kernel On Wed, Mar 07, 2012 at 09:46:08AM -0500, Paul Gortmaker wrote: > Thanks for the report. The regulator code is rather foreign > to me, but I think I figured out the expectations on the names > last night when looking at a similar patch here: All it's looking for is the output of dev_name() for the device. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120307/54328836/attachment.sig> ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH] ARM: pxa: fix regulator related build fail in magician_defconfig 2012-03-07 1:46 ` Paul Parsons 2012-03-07 14:46 ` Paul Gortmaker @ 2012-03-08 21:34 ` Paul Gortmaker 2012-03-09 2:47 ` Paul Parsons 2012-03-14 8:38 ` Haojian Zhuang 1 sibling, 2 replies; 16+ messages in thread From: Paul Gortmaker @ 2012-03-08 21:34 UTC (permalink / raw) To: linux-arm-kernel commit 737f360d5bef5e01c6cfa755dca0b449a154c1e0 (linux-next) "regulator: Remove support for supplies specified by struct device" deletes the field from the struct, but this platform was still trying to set those fields. Convert them to use the REGULATOR_SUPPLY macro. arch/arm/mach-pxa/magician.c:581: error: unknown field 'dev' specified in initializer arch/arm/mach-pxa/magician.c:581: warning: initialization from incompatible pointer type arch/arm/mach-pxa/magician.c:585: error: unknown field 'dev' specified in initializer arch/arm/mach-pxa/magician.c:585: warning: initialization from incompatible pointer type arch/arm/mach-pxa/hx4700.c:683: error: unknown field 'dev' specified in initializer arch/arm/mach-pxa/hx4700.c:683: warning: initialization from incompatible pointer type arch/arm/mach-pxa/hx4700.c:687: error: unknown field 'dev' specified in initializer arch/arm/mach-pxa/hx4700.c:687: warning: initialization from incompatible pointer type Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> --- [v3: fix arg2 in REGULATOR_SUPPLY to have correct names ] diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c index f2c23ea..b6a338b 100644 --- a/arch/arm/mach-pxa/hx4700.c +++ b/arch/arm/mach-pxa/hx4700.c @@ -679,14 +679,8 @@ static struct platform_device power_supply = { */ static struct regulator_consumer_supply bq24022_consumers[] = { - { - .dev = &gpio_vbus.dev, - .supply = "vbus_draw", - }, - { - .dev = &power_supply.dev, - .supply = "ac_draw", - }, + REGULATOR_SUPPLY("vbus_draw", "gpio-vbus"), + REGULATOR_SUPPLY("ac_draw", "pda-power"), }; static struct regulator_init_data bq24022_init_data = { diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c index 3d6baf9..1a18e63 100644 --- a/arch/arm/mach-pxa/magician.c +++ b/arch/arm/mach-pxa/magician.c @@ -577,14 +577,8 @@ static struct platform_device power_supply = { */ static struct regulator_consumer_supply bq24022_consumers[] = { - { - .dev = &gpio_vbus.dev, - .supply = "vbus_draw", - }, - { - .dev = &power_supply.dev, - .supply = "ac_draw", - }, + REGULATOR_SUPPLY("vbus_draw", "gpio-vbus"), + REGULATOR_SUPPLY("ac_draw", "pda-power"), }; static struct regulator_init_data bq24022_init_data = { -- 1.7.9.1 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH] ARM: pxa: fix regulator related build fail in magician_defconfig 2012-03-08 21:34 ` [PATCH] " Paul Gortmaker @ 2012-03-09 2:47 ` Paul Parsons 2012-03-14 8:38 ` Haojian Zhuang 1 sibling, 0 replies; 16+ messages in thread From: Paul Parsons @ 2012-03-09 2:47 UTC (permalink / raw) To: linux-arm-kernel Thanks Paul. The hx4700 patch works for me on linux-3.3.0-rc6. I'm not able to test the magician patch. Tested-by: Paul Parsons <lost.distance@yahoo.com> --- On Thu, 8/3/12, Paul Gortmaker <paul.gortmaker@windriver.com> wrote: > commit > 737f360d5bef5e01c6cfa755dca0b449a154c1e0 (linux-next) > > ? "regulator: Remove support for supplies specified by > struct device" > > deletes the field from the struct, but this platform was > still trying > to set those fields.? Convert them to use the > REGULATOR_SUPPLY macro. > > arch/arm/mach-pxa/magician.c:581: error: unknown field 'dev' > specified in initializer > arch/arm/mach-pxa/magician.c:581: warning: initialization > from incompatible pointer type > arch/arm/mach-pxa/magician.c:585: error: unknown field 'dev' > specified in initializer > arch/arm/mach-pxa/magician.c:585: warning: initialization > from incompatible pointer type > > arch/arm/mach-pxa/hx4700.c:683: error: unknown field 'dev' > specified in initializer > arch/arm/mach-pxa/hx4700.c:683: warning: initialization from > incompatible pointer type > arch/arm/mach-pxa/hx4700.c:687: error: unknown field 'dev' > specified in initializer > arch/arm/mach-pxa/hx4700.c:687: warning: initialization from > incompatible pointer type > > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> > --- > > [v3: fix arg2 in REGULATOR_SUPPLY to have correct names ] > > diff --git a/arch/arm/mach-pxa/hx4700.c > b/arch/arm/mach-pxa/hx4700.c > index f2c23ea..b6a338b 100644 > --- a/arch/arm/mach-pxa/hx4700.c > +++ b/arch/arm/mach-pxa/hx4700.c > @@ -679,14 +679,8 @@ static struct platform_device > power_supply = { > ? */ > > static struct regulator_consumer_supply bq24022_consumers[] > = { > -??? { > -??? ??? .dev = > &gpio_vbus.dev, > -??? ??? .supply = > "vbus_draw", > -??? }, > -??? { > -??? ??? .dev = > &power_supply.dev, > -??? ??? .supply = "ac_draw", > -??? }, > +??? REGULATOR_SUPPLY("vbus_draw", > "gpio-vbus"), > +??? REGULATOR_SUPPLY("ac_draw", > "pda-power"), > }; > > static struct regulator_init_data bq24022_init_data = { > diff --git a/arch/arm/mach-pxa/magician.c > b/arch/arm/mach-pxa/magician.c > index 3d6baf9..1a18e63 100644 > --- a/arch/arm/mach-pxa/magician.c > +++ b/arch/arm/mach-pxa/magician.c > @@ -577,14 +577,8 @@ static struct platform_device > power_supply = { > ? */ > > static struct regulator_consumer_supply bq24022_consumers[] > = { > -??? { > -??? ??? .dev = > &gpio_vbus.dev, > -??? ??? .supply = > "vbus_draw", > -??? }, > -??? { > -??? ??? .dev = > &power_supply.dev, > -??? ??? .supply = "ac_draw", > -??? }, > +??? REGULATOR_SUPPLY("vbus_draw", > "gpio-vbus"), > +??? REGULATOR_SUPPLY("ac_draw", > "pda-power"), > }; > > static struct regulator_init_data bq24022_init_data = { > -- > 1.7.9.1 > > ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH] ARM: pxa: fix regulator related build fail in magician_defconfig 2012-03-08 21:34 ` [PATCH] " Paul Gortmaker 2012-03-09 2:47 ` Paul Parsons @ 2012-03-14 8:38 ` Haojian Zhuang 2012-03-14 12:30 ` Paul Gortmaker 1 sibling, 1 reply; 16+ messages in thread From: Haojian Zhuang @ 2012-03-14 8:38 UTC (permalink / raw) To: linux-arm-kernel On Fri, Mar 9, 2012 at 5:34 AM, Paul Gortmaker <paul.gortmaker@windriver.com> wrote: > commit 737f360d5bef5e01c6cfa755dca0b449a154c1e0 (linux-next) > > ?"regulator: Remove support for supplies specified by struct device" > > deletes the field from the struct, but this platform was still trying > to set those fields. ?Convert them to use the REGULATOR_SUPPLY macro. > > arch/arm/mach-pxa/magician.c:581: error: unknown field 'dev' specified in initializer > arch/arm/mach-pxa/magician.c:581: warning: initialization from incompatible pointer type > arch/arm/mach-pxa/magician.c:585: error: unknown field 'dev' specified in initializer > arch/arm/mach-pxa/magician.c:585: warning: initialization from incompatible pointer type > > arch/arm/mach-pxa/hx4700.c:683: error: unknown field 'dev' specified in initializer > arch/arm/mach-pxa/hx4700.c:683: warning: initialization from incompatible pointer type > arch/arm/mach-pxa/hx4700.c:687: error: unknown field 'dev' specified in initializer > arch/arm/mach-pxa/hx4700.c:687: warning: initialization from incompatible pointer type > > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> > --- > > [v3: fix arg2 in REGULATOR_SUPPLY to have correct names ] > > diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c > index f2c23ea..b6a338b 100644 > --- a/arch/arm/mach-pxa/hx4700.c > +++ b/arch/arm/mach-pxa/hx4700.c > @@ -679,14 +679,8 @@ static struct platform_device power_supply = { > ?*/ > > ?static struct regulator_consumer_supply bq24022_consumers[] = { > - ? ? ? { > - ? ? ? ? ? ? ? .dev = &gpio_vbus.dev, > - ? ? ? ? ? ? ? .supply = "vbus_draw", > - ? ? ? }, > - ? ? ? { > - ? ? ? ? ? ? ? .dev = &power_supply.dev, > - ? ? ? ? ? ? ? .supply = "ac_draw", > - ? ? ? }, > + ? ? ? REGULATOR_SUPPLY("vbus_draw", "gpio-vbus"), > + ? ? ? REGULATOR_SUPPLY("ac_draw", "pda-power"), How do you think about Mark's comments? Use dev_name() at here. > ?}; > > ?static struct regulator_init_data bq24022_init_data = { > diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c > index 3d6baf9..1a18e63 100644 > --- a/arch/arm/mach-pxa/magician.c > +++ b/arch/arm/mach-pxa/magician.c > @@ -577,14 +577,8 @@ static struct platform_device power_supply = { > ?*/ > > ?static struct regulator_consumer_supply bq24022_consumers[] = { > - ? ? ? { > - ? ? ? ? ? ? ? .dev = &gpio_vbus.dev, > - ? ? ? ? ? ? ? .supply = "vbus_draw", > - ? ? ? }, > - ? ? ? { > - ? ? ? ? ? ? ? .dev = &power_supply.dev, > - ? ? ? ? ? ? ? .supply = "ac_draw", > - ? ? ? }, > + ? ? ? REGULATOR_SUPPLY("vbus_draw", "gpio-vbus"), > + ? ? ? REGULATOR_SUPPLY("ac_draw", "pda-power"), > ?}; > > ?static struct regulator_init_data bq24022_init_data = { > -- > 1.7.9.1 > ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH] ARM: pxa: fix regulator related build fail in magician_defconfig 2012-03-14 8:38 ` Haojian Zhuang @ 2012-03-14 12:30 ` Paul Gortmaker 2012-03-14 12:32 ` Mark Brown 0 siblings, 1 reply; 16+ messages in thread From: Paul Gortmaker @ 2012-03-14 12:30 UTC (permalink / raw) To: linux-arm-kernel On 12-03-14 04:38 AM, Haojian Zhuang wrote: > On Fri, Mar 9, 2012 at 5:34 AM, Paul Gortmaker > <paul.gortmaker@windriver.com> wrote: >> commit 737f360d5bef5e01c6cfa755dca0b449a154c1e0 (linux-next) >> >> "regulator: Remove support for supplies specified by struct device" >> >> deletes the field from the struct, but this platform was still trying >> to set those fields. Convert them to use the REGULATOR_SUPPLY macro. >> >> arch/arm/mach-pxa/magician.c:581: error: unknown field 'dev' specified in initializer >> arch/arm/mach-pxa/magician.c:581: warning: initialization from incompatible pointer type >> arch/arm/mach-pxa/magician.c:585: error: unknown field 'dev' specified in initializer >> arch/arm/mach-pxa/magician.c:585: warning: initialization from incompatible pointer type >> >> arch/arm/mach-pxa/hx4700.c:683: error: unknown field 'dev' specified in initializer >> arch/arm/mach-pxa/hx4700.c:683: warning: initialization from incompatible pointer type >> arch/arm/mach-pxa/hx4700.c:687: error: unknown field 'dev' specified in initializer >> arch/arm/mach-pxa/hx4700.c:687: warning: initialization from incompatible pointer type >> >> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> >> --- >> >> [v3: fix arg2 in REGULATOR_SUPPLY to have correct names ] >> >> diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c >> index f2c23ea..b6a338b 100644 >> --- a/arch/arm/mach-pxa/hx4700.c >> +++ b/arch/arm/mach-pxa/hx4700.c >> @@ -679,14 +679,8 @@ static struct platform_device power_supply = { >> */ >> >> static struct regulator_consumer_supply bq24022_consumers[] = { >> - { >> - .dev = &gpio_vbus.dev, >> - .supply = "vbus_draw", >> - }, >> - { >> - .dev = &power_supply.dev, >> - .supply = "ac_draw", >> - }, >> + REGULATOR_SUPPLY("vbus_draw", "gpio-vbus"), >> + REGULATOR_SUPPLY("ac_draw", "pda-power"), > > How do you think about Mark's comments? Use dev_name() at here. Hi Haojian, I'm not sure I quite understand you. I'd looked up the structs and got their respective value that would be returned by dev_name(), which is what I thought was requested of me. Thanks, Paul. >> }; >> >> static struct regulator_init_data bq24022_init_data = { >> diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c >> index 3d6baf9..1a18e63 100644 >> --- a/arch/arm/mach-pxa/magician.c >> +++ b/arch/arm/mach-pxa/magician.c >> @@ -577,14 +577,8 @@ static struct platform_device power_supply = { >> */ >> >> static struct regulator_consumer_supply bq24022_consumers[] = { >> - { >> - .dev = &gpio_vbus.dev, >> - .supply = "vbus_draw", >> - }, >> - { >> - .dev = &power_supply.dev, >> - .supply = "ac_draw", >> - }, >> + REGULATOR_SUPPLY("vbus_draw", "gpio-vbus"), >> + REGULATOR_SUPPLY("ac_draw", "pda-power"), >> }; >> >> static struct regulator_init_data bq24022_init_data = { >> -- >> 1.7.9.1 >> ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH] ARM: pxa: fix regulator related build fail in magician_defconfig 2012-03-14 12:30 ` Paul Gortmaker @ 2012-03-14 12:32 ` Mark Brown 2012-03-28 9:43 ` Russell King - ARM Linux 0 siblings, 1 reply; 16+ messages in thread From: Mark Brown @ 2012-03-14 12:32 UTC (permalink / raw) To: linux-arm-kernel On Wed, Mar 14, 2012 at 08:30:07AM -0400, Paul Gortmaker wrote: > On 12-03-14 04:38 AM, Haojian Zhuang wrote: > > How do you think about Mark's comments? Use dev_name() at here. > I'm not sure I quite understand you. I'd looked up the > structs and got their respective value that would be > returned by dev_name(), which is what I thought was > requested of me. Yes, that's what you should do. Calling dev_name() is only possible if you have the struct device and removing the need for the struct device is exactly what we're trying to avoid here. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120314/557ec99d/attachment.sig> ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH] ARM: pxa: fix regulator related build fail in magician_defconfig 2012-03-14 12:32 ` Mark Brown @ 2012-03-28 9:43 ` Russell King - ARM Linux 2012-03-28 10:18 ` Mark Brown 0 siblings, 1 reply; 16+ messages in thread From: Russell King - ARM Linux @ 2012-03-28 9:43 UTC (permalink / raw) To: linux-arm-kernel On Wed, Mar 14, 2012 at 12:32:36PM +0000, Mark Brown wrote: > On Wed, Mar 14, 2012 at 08:30:07AM -0400, Paul Gortmaker wrote: > > On 12-03-14 04:38 AM, Haojian Zhuang wrote: > > > > How do you think about Mark's comments? Use dev_name() at here. > > > I'm not sure I quite understand you. I'd looked up the > > structs and got their respective value that would be > > returned by dev_name(), which is what I thought was > > requested of me. > > Yes, that's what you should do. Calling dev_name() is only possible if > you have the struct device and removing the need for the struct device > is exactly what we're trying to avoid here. So what the hell is happening here to fix the breakage which the regulator tree caused in mainline? From this thread, it looks like it's been known about since 8th March which is now twenty days ago, and it's still broken. ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH] ARM: pxa: fix regulator related build fail in magician_defconfig 2012-03-28 9:43 ` Russell King - ARM Linux @ 2012-03-28 10:18 ` Mark Brown 2012-03-28 13:36 ` Haojian Zhuang 2012-03-28 17:56 ` Russell King - ARM Linux 0 siblings, 2 replies; 16+ messages in thread From: Mark Brown @ 2012-03-28 10:18 UTC (permalink / raw) To: linux-arm-kernel On Wed, Mar 28, 2012 at 10:43:51AM +0100, Russell King - ARM Linux wrote: > On Wed, Mar 14, 2012 at 12:32:36PM +0000, Mark Brown wrote: > > Yes, that's what you should do. Calling dev_name() is only possible if > > you have the struct device and removing the need for the struct device > > is exactly what we're trying to avoid here. > So what the hell is happening here to fix the breakage which the > regulator tree caused in mainline? From this thread, it looks like > it's been known about since 8th March which is now twenty days ago, > and it's still broken. Yes, please at least apply Paul's patches - honestly, given how old these boards are and the general lack of activity I'd rather expect that the only thing anyone's doing with them these days is build tests. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120328/e6126460/attachment.sig> ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH] ARM: pxa: fix regulator related build fail in magician_defconfig 2012-03-28 10:18 ` Mark Brown @ 2012-03-28 13:36 ` Haojian Zhuang 2012-03-28 17:56 ` Russell King - ARM Linux 1 sibling, 0 replies; 16+ messages in thread From: Haojian Zhuang @ 2012-03-28 13:36 UTC (permalink / raw) To: linux-arm-kernel On Wed, Mar 28, 2012 at 6:18 PM, Mark Brown <broonie@opensource.wolfsonmicro.com> wrote: > On Wed, Mar 28, 2012 at 10:43:51AM +0100, Russell King - ARM Linux wrote: >> On Wed, Mar 14, 2012 at 12:32:36PM +0000, Mark Brown wrote: > >> > Yes, that's what you should do. ?Calling dev_name() is only possible if >> > you have the struct device and removing the need for the struct device >> > is exactly what we're trying to avoid here. > >> So what the hell is happening here to fix the breakage which the >> regulator tree caused in mainline? ?From this thread, it looks like >> it's been known about since 8th March which is now twenty days ago, >> and it's still broken. > > Yes, please at least apply Paul's patches - honestly, given how old > these boards are and the general lack of activity I'd rather expect that > the only thing anyone's doing with them these days is build tests. Applied. I'll submit this fix to Arnd and Olof. Best Regards Haojian ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH] ARM: pxa: fix regulator related build fail in magician_defconfig 2012-03-28 10:18 ` Mark Brown 2012-03-28 13:36 ` Haojian Zhuang @ 2012-03-28 17:56 ` Russell King - ARM Linux 2012-03-28 18:10 ` Mark Brown 1 sibling, 1 reply; 16+ messages in thread From: Russell King - ARM Linux @ 2012-03-28 17:56 UTC (permalink / raw) To: linux-arm-kernel On Wed, Mar 28, 2012 at 11:18:52AM +0100, Mark Brown wrote: > On Wed, Mar 28, 2012 at 10:43:51AM +0100, Russell King - ARM Linux wrote: > > On Wed, Mar 14, 2012 at 12:32:36PM +0000, Mark Brown wrote: > > > > Yes, that's what you should do. Calling dev_name() is only possible if > > > you have the struct device and removing the need for the struct device > > > is exactly what we're trying to avoid here. > > > So what the hell is happening here to fix the breakage which the > > regulator tree caused in mainline? From this thread, it looks like > > it's been known about since 8th March which is now twenty days ago, > > and it's still broken. > > Yes, please at least apply Paul's patches - honestly, given how old > these boards are and the general lack of activity I'd rather expect that > the only thing anyone's doing with them these days is build tests. Is that a reason to push breakage to them upstream? No. Please take Paul's patches to fix the breakage which was introduced through your tree yourself. I've got enough problems this merge window to deal with without having to add further patches to my tree. Thanks. ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH] ARM: pxa: fix regulator related build fail in magician_defconfig 2012-03-28 17:56 ` Russell King - ARM Linux @ 2012-03-28 18:10 ` Mark Brown 0 siblings, 0 replies; 16+ messages in thread From: Mark Brown @ 2012-03-28 18:10 UTC (permalink / raw) To: linux-arm-kernel On Wed, Mar 28, 2012 at 06:56:13PM +0100, Russell King - ARM Linux wrote: > On Wed, Mar 28, 2012 at 11:18:52AM +0100, Mark Brown wrote: > > Yes, please at least apply Paul's patches - honestly, given how old > > these boards are and the general lack of activity I'd rather expect that > > the only thing anyone's doing with them these days is build tests. > Is that a reason to push breakage to them upstream? No. Please take > Paul's patches to fix the breakage which was introduced through your > tree yourself. I've got enough problems this merge window to deal with > without having to add further patches to my tree. Well, I'd expect this stuff to be going via the pxa tree to arm-soc rather than via your tree anyway (which seems to be what's happening at this point) - half the point with arm-soc was to ensure you didn't have to deal with things like this. Quite frankly I thought the fixes had already been applied, they were posted and reviewed in good time for the merge window and the issues weren't being reported in -next any more; had someone asked I'd have applied them as I did with the equivalent stuff for u300. If they were being totally ignored I'd probably have applied them too, though perhaps not. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120328/6f4abb48/attachment.sig> ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2012-03-28 18:10 UTC | newest] Thread overview: 16+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-03-06 19:46 [PATCH] ARM: pxa: fix regulator related build fail in magician_defconfig Paul Gortmaker 2012-03-06 20:01 ` Mark Brown 2012-03-06 20:49 ` [PATCH v2] " Paul Gortmaker 2012-03-07 1:46 ` Paul Parsons 2012-03-07 14:46 ` Paul Gortmaker 2012-03-07 14:57 ` Mark Brown 2012-03-08 21:34 ` [PATCH] " Paul Gortmaker 2012-03-09 2:47 ` Paul Parsons 2012-03-14 8:38 ` Haojian Zhuang 2012-03-14 12:30 ` Paul Gortmaker 2012-03-14 12:32 ` Mark Brown 2012-03-28 9:43 ` Russell King - ARM Linux 2012-03-28 10:18 ` Mark Brown 2012-03-28 13:36 ` Haojian Zhuang 2012-03-28 17:56 ` Russell King - ARM Linux 2012-03-28 18:10 ` Mark Brown
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).