* Regulator cleanups in mach-omap2, take two @ 2011-06-06 6:46 green 2011-06-06 6:46 ` [PATCH 1/2] cleanup regulator supply definitions in mach-omap2 to use REGULATOR_SUPPLY green 2011-06-06 6:46 ` [PATCH 2/2] Remove old-style supply.dev assignments common in hsmmc init green 0 siblings, 2 replies; 14+ messages in thread From: green @ 2011-06-06 6:46 UTC (permalink / raw) To: linux-omap; +Cc: linux-arm-kernel Hello! This is another attempt at some regulator cleanups in mach-omap2 code: Convert all users to REGULATOR_SUPPLY init style and drop the old-style .dev assignment common ins hs_mmc init. The only difference this time is the patch was split into two parts: One for REGULATOR_SUPPLY init and one for the .dev assignments removal. I made a test compile and all hte individual board files changed compile (I don't have the devices themselves, but similar changes to my device board file are working). ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 1/2] cleanup regulator supply definitions in mach-omap2 to use REGULATOR_SUPPLY 2011-06-06 6:46 Regulator cleanups in mach-omap2, take two green @ 2011-06-06 6:46 ` green 2011-06-06 6:48 ` Santosh Shilimkar 2011-06-06 9:21 ` Felipe Balbi 2011-06-06 6:46 ` [PATCH 2/2] Remove old-style supply.dev assignments common in hsmmc init green 1 sibling, 2 replies; 14+ messages in thread From: green @ 2011-06-06 6:46 UTC (permalink / raw) To: linux-omap Cc: linux-arm-kernel, Oleg Drokin, Mark Brown, Mike Rapoport, Nishant Kamat, Steve Sakoman, Felipe Balbi, Santosh Shilimkar From: Oleg Drokin <green@linuxhacker.ru> CC: Mark Brown <broonie@opensource.wolfsonmicro.com> CC: Mike Rapoport <mike@compulab.co.il> CC: Nishant Kamat <nskamat@ti.com> CC: Steve Sakoman <steve@sakoman.com> CC: Felipe Balbi <balbi@ti.com> CC: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> --- arch/arm/mach-omap2/board-4430sdp.c | 16 +++++----------- arch/arm/mach-omap2/board-cm-t35.c | 10 ++++------ arch/arm/mach-omap2/board-ldp.c | 5 ++--- arch/arm/mach-omap2/board-omap3beagle.c | 10 ++++------ arch/arm/mach-omap2/board-omap3evm.c | 10 ++++------ arch/arm/mach-omap2/board-omap3logic.c | 5 ++--- arch/arm/mach-omap2/board-omap3stalker.c | 10 ++++------ arch/arm/mach-omap2/board-omap3touchbook.c | 10 ++++------ arch/arm/mach-omap2/board-omap4panda.c | 16 +++++----------- arch/arm/mach-omap2/board-overo.c | 5 ++--- arch/arm/mach-omap2/board-zoom-peripherals.c | 21 ++++++++------------- 11 files changed, 44 insertions(+), 74 deletions(-) diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 63de2d3..914885a 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c @@ -332,17 +332,11 @@ static struct omap2_hsmmc_info mmc[] = { {} /* Terminator */ }; -static struct regulator_consumer_supply sdp4430_vaux_supply[] = { - { - .supply = "vmmc", - .dev_name = "omap_hsmmc.1", - }, -}; +static struct regulator_consumer_supply sdp4430_vaux_supply = + REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); + static struct regulator_consumer_supply sdp4430_vmmc_supply[] = { - { - .supply = "vmmc", - .dev_name = "omap_hsmmc.0", - }, + REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), }; static int omap4_twl6030_hsmmc_late_init(struct device *dev) @@ -400,7 +394,7 @@ static struct regulator_init_data sdp4430_vaux1 = { | REGULATOR_CHANGE_STATUS, }, .num_consumer_supplies = 1, - .consumer_supplies = sdp4430_vaux_supply, + .consumer_supplies = &sdp4430_vaux_supply, }; static struct regulator_init_data sdp4430_vaux2 = { diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index 77456de..33855e4 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c @@ -337,13 +337,11 @@ static void __init cm_t35_init_display(void) } } -static struct regulator_consumer_supply cm_t35_vmmc1_supply = { - .supply = "vmmc", -}; +static struct regulator_consumer_supply cm_t35_vmmc1_supply = + REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); -static struct regulator_consumer_supply cm_t35_vsim_supply = { - .supply = "vmmc_aux", -}; +static struct regulator_consumer_supply cm_t35_vsim_supply = + REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"); static struct regulator_consumer_supply cm_t35_vdac_supply = REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"); diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index f7d6038..f9b48fa 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c @@ -213,9 +213,8 @@ static struct twl4030_madc_platform_data ldp_madc_data = { .irq_line = 1, }; -static struct regulator_consumer_supply ldp_vmmc1_supply = { - .supply = "vmmc", -}; +static struct regulator_consumer_supply ldp_vmmc1_supply = + REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ static struct regulator_init_data ldp_vmmc1 = { diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 7f21d24..f72279f 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c @@ -239,13 +239,11 @@ static struct omap2_hsmmc_info mmc[] = { {} /* Terminator */ }; -static struct regulator_consumer_supply beagle_vmmc1_supply = { - .supply = "vmmc", -}; +static struct regulator_consumer_supply beagle_vmmc1_supply = + REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); -static struct regulator_consumer_supply beagle_vsim_supply = { - .supply = "vmmc_aux", -}; +static struct regulator_consumer_supply beagle_vsim_supply = + REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"); static struct gpio_led gpio_leds[]; diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index b4d4346..67d8a79 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c @@ -273,13 +273,11 @@ static struct omap_dss_board_info omap3_evm_dss_data = { .default_device = &omap3_evm_lcd_device, }; -static struct regulator_consumer_supply omap3evm_vmmc1_supply = { - .supply = "vmmc", -}; +static struct regulator_consumer_supply omap3evm_vmmc1_supply = + REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); -static struct regulator_consumer_supply omap3evm_vsim_supply = { - .supply = "vmmc_aux", -}; +static struct regulator_consumer_supply omap3evm_vsim_supply = + REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"); /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ static struct regulator_init_data omap3evm_vmmc1 = { diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c index 60d9be4..4a37bf76f 100644 --- a/arch/arm/mach-omap2/board-omap3logic.c +++ b/arch/arm/mach-omap2/board-omap3logic.c @@ -55,9 +55,8 @@ #define OMAP3_TORPEDO_MMC_GPIO_CD 127 #define OMAP3_TORPEDO_SMSC911X_GPIO_IRQ 129 -static struct regulator_consumer_supply omap3logic_vmmc1_supply = { - .supply = "vmmc", -}; +static struct regulator_consumer_supply omap3logic_vmmc1_supply = + REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ static struct regulator_init_data omap3logic_vmmc1 = { diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c index 0c108a2..3bf67ab 100644 --- a/arch/arm/mach-omap2/board-omap3stalker.c +++ b/arch/arm/mach-omap2/board-omap3stalker.c @@ -206,13 +206,11 @@ static struct omap_dss_board_info omap3_stalker_dss_data = { .default_device = &omap3_stalker_dvi_device, }; -static struct regulator_consumer_supply omap3stalker_vmmc1_supply = { - .supply = "vmmc", -}; +static struct regulator_consumer_supply omap3stalker_vmmc1_supply = + REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); -static struct regulator_consumer_supply omap3stalker_vsim_supply = { - .supply = "vmmc_aux", -}; +static struct regulator_consumer_supply omap3stalker_vsim_supply = + REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"); /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ static struct regulator_init_data omap3stalker_vmmc1 = { diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c index 5f649fa..27840e8 100644 --- a/arch/arm/mach-omap2/board-omap3touchbook.c +++ b/arch/arm/mach-omap2/board-omap3touchbook.c @@ -114,13 +114,11 @@ static struct omap_lcd_config omap3_touchbook_lcd_config __initdata = { .ctrl_name = "internal", }; -static struct regulator_consumer_supply touchbook_vmmc1_supply = { - .supply = "vmmc", -}; +static struct regulator_consumer_supply touchbook_vmmc1_supply = + REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); -static struct regulator_consumer_supply touchbook_vsim_supply = { - .supply = "vmmc_aux", -}; +static struct regulator_consumer_supply touchbook_vsim_supply = + REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"); static struct gpio_led gpio_leds[]; diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index 0cfe200..37823e4 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c @@ -182,17 +182,11 @@ static struct omap2_hsmmc_info mmc[] = { {} /* Terminator */ }; -static struct regulator_consumer_supply omap4_panda_vmmc_supply[] = { - { - .supply = "vmmc", - .dev_name = "omap_hsmmc.0", - }, -}; +static struct regulator_consumer_supply omap4_panda_vmmc_supply = + REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); -static struct regulator_consumer_supply omap4_panda_vmmc5_supply = { - .supply = "vmmc", - .dev_name = "omap_hsmmc.4", -}; +static struct regulator_consumer_supply omap4_panda_vmmc5_supply = + REGULATOR_SUPPLY("vmmc", "omap_hsmmc.4"); static struct regulator_init_data panda_vmmc5 = { .constraints = { @@ -313,7 +307,7 @@ static struct regulator_init_data omap4_panda_vmmc = { | REGULATOR_CHANGE_STATUS, }, .num_consumer_supplies = 1, - .consumer_supplies = omap4_panda_vmmc_supply, + .consumer_supplies = &omap4_panda_vmmc_supply, }; static struct regulator_init_data omap4_panda_vpp = { diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index 175e1ab..e6c6153 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c @@ -319,9 +319,8 @@ static struct omap2_hsmmc_info mmc[] = { {} /* Terminator */ }; -static struct regulator_consumer_supply overo_vmmc1_supply = { - .supply = "vmmc", -}; +static struct regulator_consumer_supply overo_vmmc1_supply = + REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) #include <linux/leds.h> diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c index 118c6f5..db77305 100644 --- a/arch/arm/mach-omap2/board-zoom-peripherals.c +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c @@ -105,22 +105,17 @@ static struct twl4030_keypad_data zoom_kp_twl4030_data = { .rep = 1, }; -static struct regulator_consumer_supply zoom_vmmc1_supply = { - .supply = "vmmc", -}; +static struct regulator_consumer_supply zoom_vmmc1_supply = + REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); -static struct regulator_consumer_supply zoom_vsim_supply = { - .supply = "vmmc_aux", -}; +static struct regulator_consumer_supply zoom_vsim_supply = + REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"); -static struct regulator_consumer_supply zoom_vmmc2_supply = { - .supply = "vmmc", -}; +static struct regulator_consumer_supply zoom_vmmc2_supply = + REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); -static struct regulator_consumer_supply zoom_vmmc3_supply = { - .supply = "vmmc", - .dev_name = "omap_hsmmc.2", -}; +static struct regulator_consumer_supply zoom_vmmc3_supply = + REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2"); /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ static struct regulator_init_data zoom_vmmc1 = { -- 1.7.4.4 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 1/2] cleanup regulator supply definitions in mach-omap2 to use REGULATOR_SUPPLY 2011-06-06 6:46 ` [PATCH 1/2] cleanup regulator supply definitions in mach-omap2 to use REGULATOR_SUPPLY green @ 2011-06-06 6:48 ` Santosh Shilimkar 2011-06-06 9:21 ` Felipe Balbi 1 sibling, 0 replies; 14+ messages in thread From: Santosh Shilimkar @ 2011-06-06 6:48 UTC (permalink / raw) To: green Cc: linux-omap, linux-arm-kernel, Mark Brown, Mike Rapoport, Nishant Kamat, Steve Sakoman, Felipe Balbi On 6/6/2011 12:16 PM, green@linuxhacker.ru wrote: > From: Oleg Drokin<green@linuxhacker.ru> > > CC: Mark Brown<broonie@opensource.wolfsonmicro.com> > CC: Mike Rapoport<mike@compulab.co.il> > CC: Nishant Kamat<nskamat@ti.com> > CC: Steve Sakoman<steve@sakoman.com> > CC: Felipe Balbi<balbi@ti.com> > CC: Santosh Shilimkar<santosh.shilimkar@ti.com> > Signed-off-by: Oleg Drokin<green@linuxhacker.ru> > --- Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/2] cleanup regulator supply definitions in mach-omap2 to use REGULATOR_SUPPLY 2011-06-06 6:46 ` [PATCH 1/2] cleanup regulator supply definitions in mach-omap2 to use REGULATOR_SUPPLY green 2011-06-06 6:48 ` Santosh Shilimkar @ 2011-06-06 9:21 ` Felipe Balbi 2011-06-06 15:45 ` Oleg Drokin 1 sibling, 1 reply; 14+ messages in thread From: Felipe Balbi @ 2011-06-06 9:21 UTC (permalink / raw) To: green Cc: linux-omap, linux-arm-kernel, Mark Brown, Mike Rapoport, Nishant Kamat, Steve Sakoman, Felipe Balbi, Santosh Shilimkar [-- Attachment #1: Type: text/plain, Size: 3231 bytes --] Hi, On Mon, Jun 06, 2011 at 02:46:01AM -0400, green@linuxhacker.ru wrote: > From: Oleg Drokin <green@linuxhacker.ru> > > CC: Mark Brown <broonie@opensource.wolfsonmicro.com> > CC: Mike Rapoport <mike@compulab.co.il> > CC: Nishant Kamat <nskamat@ti.com> > CC: Steve Sakoman <steve@sakoman.com> > CC: Felipe Balbi <balbi@ti.com> > CC: Santosh Shilimkar <santosh.shilimkar@ti.com> > Signed-off-by: Oleg Drokin <green@linuxhacker.ru> > --- > arch/arm/mach-omap2/board-4430sdp.c | 16 +++++----------- > arch/arm/mach-omap2/board-cm-t35.c | 10 ++++------ > arch/arm/mach-omap2/board-ldp.c | 5 ++--- > arch/arm/mach-omap2/board-omap3beagle.c | 10 ++++------ > arch/arm/mach-omap2/board-omap3evm.c | 10 ++++------ > arch/arm/mach-omap2/board-omap3logic.c | 5 ++--- > arch/arm/mach-omap2/board-omap3stalker.c | 10 ++++------ > arch/arm/mach-omap2/board-omap3touchbook.c | 10 ++++------ > arch/arm/mach-omap2/board-omap4panda.c | 16 +++++----------- > arch/arm/mach-omap2/board-overo.c | 5 ++--- > arch/arm/mach-omap2/board-zoom-peripherals.c | 21 ++++++++------------- > 11 files changed, 44 insertions(+), 74 deletions(-) > > diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c > index 63de2d3..914885a 100644 > --- a/arch/arm/mach-omap2/board-4430sdp.c > +++ b/arch/arm/mach-omap2/board-4430sdp.c > @@ -332,17 +332,11 @@ static struct omap2_hsmmc_info mmc[] = { > {} /* Terminator */ > }; > > -static struct regulator_consumer_supply sdp4430_vaux_supply[] = { > - { > - .supply = "vmmc", > - .dev_name = "omap_hsmmc.1", > - }, > -}; > +static struct regulator_consumer_supply sdp4430_vaux_supply = > + REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); this should be an array, as it was before. > + > static struct regulator_consumer_supply sdp4430_vmmc_supply[] = { > - { > - .supply = "vmmc", > - .dev_name = "omap_hsmmc.0", > - }, > + REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), > }; > > static int omap4_twl6030_hsmmc_late_init(struct device *dev) > @@ -400,7 +394,7 @@ static struct regulator_init_data sdp4430_vaux1 = { > | REGULATOR_CHANGE_STATUS, > }, > .num_consumer_supplies = 1, and this should use ARRAY_SIZE(), > - .consumer_supplies = sdp4430_vaux_supply, > + .consumer_supplies = &sdp4430_vaux_supply, > }; > > static struct regulator_init_data sdp4430_vaux2 = { > diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c > index 77456de..33855e4 100644 > --- a/arch/arm/mach-omap2/board-cm-t35.c > +++ b/arch/arm/mach-omap2/board-cm-t35.c > @@ -337,13 +337,11 @@ static void __init cm_t35_init_display(void) > } > } > > -static struct regulator_consumer_supply cm_t35_vmmc1_supply = { > - .supply = "vmmc", > -}; > +static struct regulator_consumer_supply cm_t35_vmmc1_supply = > + REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); this should also be array. It should read as: static struct regulator_consumer_supply cm_t35_vmmc1_supply[] = REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0", }; ditto to all others. -- balbi [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 490 bytes --] ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/2] cleanup regulator supply definitions in mach-omap2 to use REGULATOR_SUPPLY 2011-06-06 9:21 ` Felipe Balbi @ 2011-06-06 15:45 ` Oleg Drokin 2011-06-06 17:13 ` Felipe Balbi 0 siblings, 1 reply; 14+ messages in thread From: Oleg Drokin @ 2011-06-06 15:45 UTC (permalink / raw) To: balbi Cc: linux-omap, linux-arm-kernel, Mark Brown, Mike Rapoport, Nishant Kamat, Steve Sakoman, Santosh Shilimkar Hello! On Jun 6, 2011, at 5:21 AM, Felipe Balbi wrote: >> -static struct regulator_consumer_supply sdp4430_vaux_supply[] = { >> - { >> - .supply = "vmmc", >> - .dev_name = "omap_hsmmc.1", >> - }, >> -}; >> +static struct regulator_consumer_supply sdp4430_vaux_supply = >> + REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); > this should be an array, as it was before. Only one is defined right now. Whoever needs a second element can convert it to array, I think? What;s the importance of having it as an array right now? >> --- a/arch/arm/mach-omap2/board-cm-t35.c >> +++ b/arch/arm/mach-omap2/board-cm-t35.c >> @@ -337,13 +337,11 @@ static void __init cm_t35_init_display(void) >> } >> } >> >> -static struct regulator_consumer_supply cm_t35_vmmc1_supply = { >> - .supply = "vmmc", >> -}; >> +static struct regulator_consumer_supply cm_t35_vmmc1_supply = >> + REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); > > this should also be array. It should read as: > > static struct regulator_consumer_supply cm_t35_vmmc1_supply[] = > REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0", > }; Why this one should be an array? There is only one vmmc supply in functionality-reduced implementation TWL used on this board. (in fact this particular board files defines more supplies then there are in the TWL and I planned to do another patch that would kill all the defined but not really existing supplies next like vpll2 and such). Bye, Oleg ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/2] cleanup regulator supply definitions in mach-omap2 to use REGULATOR_SUPPLY 2011-06-06 15:45 ` Oleg Drokin @ 2011-06-06 17:13 ` Felipe Balbi 2011-06-06 17:18 ` Oleg Drokin 0 siblings, 1 reply; 14+ messages in thread From: Felipe Balbi @ 2011-06-06 17:13 UTC (permalink / raw) To: Oleg Drokin Cc: Nishant Kamat, Mark Brown, balbi, Santosh Shilimkar, Mike Rapoport, linux-omap, linux-arm-kernel, Steve Sakoman [-- Attachment #1.1: Type: text/plain, Size: 2878 bytes --] Hi, On Mon, Jun 06, 2011 at 11:45:29AM -0400, Oleg Drokin wrote: > >> -static struct regulator_consumer_supply sdp4430_vaux_supply[] = { > >> - { > >> - .supply = "vmmc", > >> - .dev_name = "omap_hsmmc.1", > >> - }, > >> -}; > >> +static struct regulator_consumer_supply sdp4430_vaux_supply = > >> + REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); > > this should be an array, as it was before. > > Only one is defined right now. > Whoever needs a second element can convert it to array, I think? > What;s the importance of having it as an array right now? because later patches will be easier to review. Look below: When I have this: static struct regulator_consumer_supply sdp4430_vmmc_supply[] = { REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), }; static struct regulator_init_data sdp4430_vmmc = { .constraints = { .min_uV = 1200000, .max_uV = 3000000, .apply_uV = true, .valid_modes_mask = REGULATOR_MODE_NORMAL | REGULATOR_MODE_STANDBY, .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, .num_consumer_supplies = ARRAY_SIZE(sdp4430_vmmc_supply), .consumer_supplies = sdp4430_vmmc_supply, }; and I want to add a new REGULATOR_SUPPLY() the diff is simple: @@ -1,5 +1,6 @@ static struct regulator_consumer_supply sdp4430_vmmc_supply[] = { REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), + REGULATOR_SUPPLY("vmmc2", "omap_hsmmc.0"), }; static struct regulator_init_data sdp4430_vmmc = { now when I have this: static struct regulator_consumer_supply sdp4430_vmmc_supply = REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); static struct regulator_init_data sdp4430_vmmc = { .constraints = { .min_uV = 1200000, .max_uV = 3000000, .apply_uV = true, .valid_modes_mask = REGULATOR_MODE_NORMAL | REGULATOR_MODE_STANDBY, .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, .num_consumer_supplies = 1, .consumer_supplies = &sdp4430_vmmc_supply, }; and I want to add the same supply, the diff is less obvious: @@ -1,5 +1,7 @@ -static struct regulator_consumer_supply sdp4430_vmmc_supply = - REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); +static struct regulator_consumer_supply sdp4430_vmmc_supply[] = { + REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), + REGULATOR_SUPPLY("vmmc2", "omap_hsmmc.0"), +}; static struct regulator_init_data sdp4430_vmmc = { .constraints = { @@ -12,6 +14,6 @@ static struct regulator_init_data sdp443 | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, - .consumer_supplies = &sdp4430_vmmc_supply, + .num_consumer_supplies = ARRAY_SIZE(sdp4430_vmmc_supply), + .consumer_supplies = sdp4430_vmmc_supply, }; can you see now ? -- balbi [-- Attachment #1.2: Digital signature --] [-- Type: application/pgp-signature, Size: 490 bytes --] [-- Attachment #2: Type: text/plain, Size: 176 bytes --] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/2] cleanup regulator supply definitions in mach-omap2 to use REGULATOR_SUPPLY 2011-06-06 17:13 ` Felipe Balbi @ 2011-06-06 17:18 ` Oleg Drokin 2011-06-06 17:28 ` Felipe Balbi 0 siblings, 1 reply; 14+ messages in thread From: Oleg Drokin @ 2011-06-06 17:18 UTC (permalink / raw) To: balbi Cc: linux-omap, linux-arm-kernel, Mark Brown, Mike Rapoport, Nishant Kamat, Steve Sakoman, Santosh Shilimkar Hello! On Jun 6, 2011, at 1:13 PM, Felipe Balbi wrote: > On Mon, Jun 06, 2011 at 11:45:29AM -0400, Oleg Drokin wrote: >>>> -static struct regulator_consumer_supply sdp4430_vaux_supply[] = { >>>> - { >>>> - .supply = "vmmc", >>>> - .dev_name = "omap_hsmmc.1", >>>> - }, >>>> -}; >>>> +static struct regulator_consumer_supply sdp4430_vaux_supply = >>>> + REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); >>> this should be an array, as it was before. >> >> Only one is defined right now. >> Whoever needs a second element can convert it to array, I think? >> What;s the importance of having it as an array right now? > because later patches will be easier to review. Look below: ... > can you see now ? Ok, I get the idea. Do you think it would be best to convert every supply definition to an array then just in case? I wonder what are the chances of additional regulators to appear at all in many of these. What about supplies that are not going to have additional elements (like that cm-t35 board, because there simply are no more regulators in the twl)? Bye, Oleg ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/2] cleanup regulator supply definitions in mach-omap2 to use REGULATOR_SUPPLY 2011-06-06 17:18 ` Oleg Drokin @ 2011-06-06 17:28 ` Felipe Balbi 2011-06-06 17:36 ` Oleg Drokin 0 siblings, 1 reply; 14+ messages in thread From: Felipe Balbi @ 2011-06-06 17:28 UTC (permalink / raw) To: Oleg Drokin Cc: Nishant Kamat, Mark Brown, balbi, Santosh Shilimkar, Mike Rapoport, linux-omap, linux-arm-kernel, Steve Sakoman [-- Attachment #1.1: Type: text/plain, Size: 1484 bytes --] On Mon, Jun 06, 2011 at 01:18:41PM -0400, Oleg Drokin wrote: > Hello! > > On Jun 6, 2011, at 1:13 PM, Felipe Balbi wrote: > > On Mon, Jun 06, 2011 at 11:45:29AM -0400, Oleg Drokin wrote: > >>>> -static struct regulator_consumer_supply sdp4430_vaux_supply[] = { > >>>> - { > >>>> - .supply = "vmmc", > >>>> - .dev_name = "omap_hsmmc.1", > >>>> - }, > >>>> -}; > >>>> +static struct regulator_consumer_supply sdp4430_vaux_supply = > >>>> + REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); > >>> this should be an array, as it was before. > >> > >> Only one is defined right now. > >> Whoever needs a second element can convert it to array, I think? > >> What;s the importance of having it as an array right now? > > because later patches will be easier to review. Look below: > ... > > can you see now ? > > Ok, I get the idea. Do you think it would be best to convert every supply > definition to an array then just in case? I think that while you're doing this big conversion, why not ? > I wonder what are the chances of additional regulators to appear at all > in many of these. > What about supplies that are not going to have additional elements > (like that cm-t35 board, because there simply are no more regulators in the twl)? Still, It's the same thing I was discussing with Alan Stern on another thread, it comes down to uniformity and you never know when someone might decide to hook up and always on supply to any node :-p -- balbi [-- Attachment #1.2: Digital signature --] [-- Type: application/pgp-signature, Size: 490 bytes --] [-- Attachment #2: Type: text/plain, Size: 176 bytes --] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/2] cleanup regulator supply definitions in mach-omap2 to use REGULATOR_SUPPLY 2011-06-06 17:28 ` Felipe Balbi @ 2011-06-06 17:36 ` Oleg Drokin 0 siblings, 0 replies; 14+ messages in thread From: Oleg Drokin @ 2011-06-06 17:36 UTC (permalink / raw) To: balbi Cc: linux-omap, linux-arm-kernel, Mark Brown, Mike Rapoport, Nishant Kamat, Steve Sakoman, Santosh Shilimkar Hello! On Jun 6, 2011, at 1:28 PM, Felipe Balbi wrote: >> Ok, I get the idea. Do you think it would be best to convert every supply >> definition to an array then just in case? > I think that while you're doing this big conversion, why not ? Well, ok then. I'll redo this patch. Bye, Oleg ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 2/2] Remove old-style supply.dev assignments common in hsmmc init 2011-06-06 6:46 Regulator cleanups in mach-omap2, take two green 2011-06-06 6:46 ` [PATCH 1/2] cleanup regulator supply definitions in mach-omap2 to use REGULATOR_SUPPLY green @ 2011-06-06 6:46 ` green 2011-06-06 9:22 ` Felipe Balbi 2011-06-06 10:13 ` Grazvydas Ignotas 1 sibling, 2 replies; 14+ messages in thread From: green @ 2011-06-06 6:46 UTC (permalink / raw) To: linux-omap Cc: linux-arm-kernel, Oleg Drokin, Mark Brown, Mike Rapoport, Nishant Kamat, Steve Sakoman, Felipe Balbi From: Oleg Drokin <green@linuxhacker.ru> CC: Mark Brown <broonie@opensource.wolfsonmicro.com> CC: Mike Rapoport <mike@compulab.co.il> CC: Nishant Kamat <nskamat@ti.com> CC: Steve Sakoman <steve@sakoman.com> CC: Felipe Balbi <balbi@ti.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> --- arch/arm/mach-omap2/board-cm-t35.c | 2 -- arch/arm/mach-omap2/board-ldp.c | 2 -- arch/arm/mach-omap2/board-omap3beagle.c | 4 ---- arch/arm/mach-omap2/board-omap3evm.c | 4 ---- arch/arm/mach-omap2/board-omap3logic.c | 2 -- arch/arm/mach-omap2/board-omap3stalker.c | 4 ---- arch/arm/mach-omap2/board-omap3touchbook.c | 4 ---- arch/arm/mach-omap2/board-overo.c | 2 -- arch/arm/mach-omap2/board-zoom-peripherals.c | 7 ------- 9 files changed, 0 insertions(+), 31 deletions(-) diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index 33855e4..a38cd70 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c @@ -480,8 +480,6 @@ static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio, omap2_hsmmc_init(mmc); /* link regulators to MMC adapters */ - cm_t35_vmmc1_supply.dev = mmc[0].dev; - cm_t35_vsim_supply.dev = mmc[0].dev; return 0; } diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index f9b48fa..b519f2a 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c @@ -340,8 +340,6 @@ static void __init omap_ldp_init(void) ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS, 0); omap2_hsmmc_init(mmc); - /* link regulators to MMC adapters */ - ldp_vmmc1_supply.dev = mmc[0].dev; } MACHINE_START(OMAP_LDP, "OMAP LDP board") diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index f72279f..21e9df5 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c @@ -265,10 +265,6 @@ static int beagle_twl_gpio_setup(struct device *dev, mmc[0].gpio_cd = gpio + 0; omap2_hsmmc_init(mmc); - /* link regulators to MMC adapters */ - beagle_vmmc1_supply.dev = mmc[0].dev; - beagle_vsim_supply.dev = mmc[0].dev; - /* * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active * high / others active low) diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index 67d8a79..f648354 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c @@ -363,10 +363,6 @@ static int omap3evm_twl_gpio_setup(struct device *dev, mmc[0].gpio_cd = gpio + 0; omap2_hsmmc_init(mmc); - /* link regulators to MMC adapters */ - omap3evm_vmmc1_supply.dev = mmc[0].dev; - omap3evm_vsim_supply.dev = mmc[0].dev; - /* * Most GPIOs are for USB OTG. Some are mostly sent to * the P2 connector; notably LEDA for the LCD backlight. diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c index 4a37bf76f..8c0dd69 100644 --- a/arch/arm/mach-omap2/board-omap3logic.c +++ b/arch/arm/mach-omap2/board-omap3logic.c @@ -129,8 +129,6 @@ static void __init board_mmc_init(void) } omap2_hsmmc_init(board_mmc_info); - /* link regulators to MMC adapters */ - omap3logic_vmmc1_supply.dev = board_mmc_info[0].dev; } static struct omap_smsc911x_platform_data __initdata board_smsc911x_data = { diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c index 3bf67ab..8e79df2 100644 --- a/arch/arm/mach-omap2/board-omap3stalker.c +++ b/arch/arm/mach-omap2/board-omap3stalker.c @@ -319,10 +319,6 @@ omap3stalker_twl_gpio_setup(struct device *dev, mmc[0].gpio_cd = gpio + 0; omap2_hsmmc_init(mmc); - /* link regulators to MMC adapters */ - omap3stalker_vmmc1_supply.dev = mmc[0].dev; - omap3stalker_vsim_supply.dev = mmc[0].dev; - /* * Most GPIOs are for USB OTG. Some are mostly sent to * the P2 connector; notably LEDA for the LCD backlight. diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c index 27840e8..7c45659 100644 --- a/arch/arm/mach-omap2/board-omap3touchbook.c +++ b/arch/arm/mach-omap2/board-omap3touchbook.c @@ -135,10 +135,6 @@ static int touchbook_twl_gpio_setup(struct device *dev, mmc[0].gpio_cd = gpio + 0; omap2_hsmmc_init(mmc); - /* link regulators to MMC adapters */ - touchbook_vmmc1_supply.dev = mmc[0].dev; - touchbook_vsim_supply.dev = mmc[0].dev; - /* REVISIT: need ehci-omap hooks for external VBUS * power switch and overcurrent detect */ diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index e6c6153..b87b8da 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c @@ -414,8 +414,6 @@ static int overo_twl_gpio_setup(struct device *dev, { omap2_hsmmc_init(mmc); - overo_vmmc1_supply.dev = mmc[0].dev; - #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c index db77305..5591c3f 100644 --- a/arch/arm/mach-omap2/board-zoom-peripherals.c +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c @@ -265,13 +265,6 @@ static int zoom_twl_gpio_setup(struct device *dev, mmc[0].gpio_cd = gpio + 0; omap2_hsmmc_init(mmc); - /* link regulators to MMC adapters ... we "know" the - * regulators will be set up only *after* we return. - */ - zoom_vmmc1_supply.dev = mmc[0].dev; - zoom_vsim_supply.dev = mmc[0].dev; - zoom_vmmc2_supply.dev = mmc[1].dev; - ret = gpio_request_one(LCD_PANEL_ENABLE_GPIO, GPIOF_OUT_INIT_LOW, "lcd enable"); if (ret) -- 1.7.4.4 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 2/2] Remove old-style supply.dev assignments common in hsmmc init 2011-06-06 6:46 ` [PATCH 2/2] Remove old-style supply.dev assignments common in hsmmc init green @ 2011-06-06 9:22 ` Felipe Balbi 2011-06-06 10:13 ` Grazvydas Ignotas 1 sibling, 0 replies; 14+ messages in thread From: Felipe Balbi @ 2011-06-06 9:22 UTC (permalink / raw) To: green Cc: linux-omap, linux-arm-kernel, Mark Brown, Mike Rapoport, Nishant Kamat, Steve Sakoman, Felipe Balbi [-- Attachment #1: Type: text/plain, Size: 443 bytes --] On Mon, Jun 06, 2011 at 02:46:02AM -0400, green@linuxhacker.ru wrote: > From: Oleg Drokin <green@linuxhacker.ru> > > CC: Mark Brown <broonie@opensource.wolfsonmicro.com> > CC: Mike Rapoport <mike@compulab.co.il> > CC: Nishant Kamat <nskamat@ti.com> > CC: Steve Sakoman <steve@sakoman.com> > CC: Felipe Balbi <balbi@ti.com> > Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Reviewed-by: Felipe Balbi <balbi@ti.com> -- balbi [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 490 bytes --] ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/2] Remove old-style supply.dev assignments common in hsmmc init 2011-06-06 6:46 ` [PATCH 2/2] Remove old-style supply.dev assignments common in hsmmc init green 2011-06-06 9:22 ` Felipe Balbi @ 2011-06-06 10:13 ` Grazvydas Ignotas 1 sibling, 0 replies; 14+ messages in thread From: Grazvydas Ignotas @ 2011-06-06 10:13 UTC (permalink / raw) To: green Cc: linux-omap, linux-arm-kernel, Mark Brown, Mike Rapoport, Nishant Kamat, Steve Sakoman, Felipe Balbi On Mon, Jun 6, 2011 at 9:46 AM, <green@linuxhacker.ru> wrote: > From: Oleg Drokin <green@linuxhacker.ru> > > CC: Mark Brown <broonie@opensource.wolfsonmicro.com> > CC: Mike Rapoport <mike@compulab.co.il> > CC: Nishant Kamat <nskamat@ti.com> > CC: Steve Sakoman <steve@sakoman.com> > CC: Felipe Balbi <balbi@ti.com> > Signed-off-by: Oleg Drokin <green@linuxhacker.ru> > --- > arch/arm/mach-omap2/board-cm-t35.c | 2 -- > arch/arm/mach-omap2/board-ldp.c | 2 -- > arch/arm/mach-omap2/board-omap3beagle.c | 4 ---- > arch/arm/mach-omap2/board-omap3evm.c | 4 ---- > arch/arm/mach-omap2/board-omap3logic.c | 2 -- > arch/arm/mach-omap2/board-omap3stalker.c | 4 ---- > arch/arm/mach-omap2/board-omap3touchbook.c | 4 ---- > arch/arm/mach-omap2/board-overo.c | 2 -- > arch/arm/mach-omap2/board-zoom-peripherals.c | 7 ------- > 9 files changed, 0 insertions(+), 31 deletions(-) > > diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c > index 33855e4..a38cd70 100644 > --- a/arch/arm/mach-omap2/board-cm-t35.c > +++ b/arch/arm/mach-omap2/board-cm-t35.c > @@ -480,8 +480,6 @@ static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio, > omap2_hsmmc_init(mmc); > > /* link regulators to MMC adapters */ Would be useful to remove this comment too. > - cm_t35_vmmc1_supply.dev = mmc[0].dev; > - cm_t35_vsim_supply.dev = mmc[0].dev; > > return 0; > } -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 14+ messages in thread
* Regulator cleanups in mach-omap2, take three @ 2011-06-06 18:57 green 2011-06-06 18:57 ` [PATCH 2/2] Remove old-style supply.dev assignments common in hsmmc init green 0 siblings, 1 reply; 14+ messages in thread From: green @ 2011-06-06 18:57 UTC (permalink / raw) To: linux-omap; +Cc: linux-arm-kernel Hello! This is yet another attempt at some regulator cleanups in mach-omap2 code: Convert all users to REGULATOR_SUPPLY init style and drop the old-style .dev assignment common ins hs_mmc init. I made a test compile and all the individual board files changed compile (I don't have the devices themselves, but similar changes to my device board file are working). For the pandaboard changes - I am not sure what the proper names for those devices would be, so only converted the regulator to array. Big changes since v2: Per Felipe Balbi request converted all regulator supplies to arrays just in case. Also nuked an unneeded comment in cm-t35 board left after mmc.dev assignment removal. ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 2/2] Remove old-style supply.dev assignments common in hsmmc init 2011-06-06 18:57 Regulator cleanups in mach-omap2, take three green @ 2011-06-06 18:57 ` green 2011-06-06 19:25 ` Felipe Balbi 0 siblings, 1 reply; 14+ messages in thread From: green @ 2011-06-06 18:57 UTC (permalink / raw) To: linux-omap Cc: linux-arm-kernel, Oleg Drokin, Mark Brown, Mike Rapoport, Nishant Kamat, Steve Sakoman, Felipe Balbi From: Oleg Drokin <green@linuxhacker.ru> CC: Mark Brown <broonie@opensource.wolfsonmicro.com> CC: Mike Rapoport <mike@compulab.co.il> CC: Nishant Kamat <nskamat@ti.com> CC: Steve Sakoman <steve@sakoman.com> CC: Felipe Balbi <balbi@ti.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> --- arch/arm/mach-omap2/board-cm-t35.c | 4 ---- arch/arm/mach-omap2/board-ldp.c | 2 -- arch/arm/mach-omap2/board-omap3beagle.c | 4 ---- arch/arm/mach-omap2/board-omap3evm.c | 4 ---- arch/arm/mach-omap2/board-omap3logic.c | 2 -- arch/arm/mach-omap2/board-omap3stalker.c | 4 ---- arch/arm/mach-omap2/board-omap3touchbook.c | 4 ---- arch/arm/mach-omap2/board-overo.c | 2 -- arch/arm/mach-omap2/board-zoom-peripherals.c | 7 ------- 9 files changed, 0 insertions(+), 33 deletions(-) diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index e7bf32d..ceb581e 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c @@ -483,10 +483,6 @@ static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio, mmc[0].gpio_cd = gpio + 0; omap2_hsmmc_init(mmc); - /* link regulators to MMC adapters */ - cm_t35_vmmc1_supply.dev = mmc[0].dev; - cm_t35_vsim_supply.dev = mmc[0].dev; - return 0; } diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index 069bc9f..2d7e0ae 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c @@ -341,8 +341,6 @@ static void __init omap_ldp_init(void) ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS, 0); omap2_hsmmc_init(mmc); - /* link regulators to MMC adapters */ - ldp_vmmc1_supply.dev = mmc[0].dev; } MACHINE_START(OMAP_LDP, "OMAP LDP board") diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 4cf7c19..8ef0e19 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c @@ -268,10 +268,6 @@ static int beagle_twl_gpio_setup(struct device *dev, mmc[0].gpio_cd = gpio + 0; omap2_hsmmc_init(mmc); - /* link regulators to MMC adapters */ - beagle_vmmc1_supply.dev = mmc[0].dev; - beagle_vsim_supply.dev = mmc[0].dev; - /* * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active * high / others active low) diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index fc7a23a..e2202dd 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c @@ -365,10 +365,6 @@ static int omap3evm_twl_gpio_setup(struct device *dev, mmc[0].gpio_cd = gpio + 0; omap2_hsmmc_init(mmc); - /* link regulators to MMC adapters */ - omap3evm_vmmc1_supply.dev = mmc[0].dev; - omap3evm_vsim_supply.dev = mmc[0].dev; - /* * Most GPIOs are for USB OTG. Some are mostly sent to * the P2 connector; notably LEDA for the LCD backlight. diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c index ec18435..eaefb59 100644 --- a/arch/arm/mach-omap2/board-omap3logic.c +++ b/arch/arm/mach-omap2/board-omap3logic.c @@ -130,8 +130,6 @@ static void __init board_mmc_init(void) } omap2_hsmmc_init(board_mmc_info); - /* link regulators to MMC adapters */ - omap3logic_vmmc1_supply.dev = board_mmc_info[0].dev; } static struct omap_smsc911x_platform_data __initdata board_smsc911x_data = { diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c index 99be540..63d12a3 100644 --- a/arch/arm/mach-omap2/board-omap3stalker.c +++ b/arch/arm/mach-omap2/board-omap3stalker.c @@ -321,10 +321,6 @@ omap3stalker_twl_gpio_setup(struct device *dev, mmc[0].gpio_cd = gpio + 0; omap2_hsmmc_init(mmc); - /* link regulators to MMC adapters */ - omap3stalker_vmmc1_supply.dev = mmc[0].dev; - omap3stalker_vsim_supply.dev = mmc[0].dev; - /* * Most GPIOs are for USB OTG. Some are mostly sent to * the P2 connector; notably LEDA for the LCD backlight. diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c index ab5c37d..c80e2c3 100644 --- a/arch/arm/mach-omap2/board-omap3touchbook.c +++ b/arch/arm/mach-omap2/board-omap3touchbook.c @@ -137,10 +137,6 @@ static int touchbook_twl_gpio_setup(struct device *dev, mmc[0].gpio_cd = gpio + 0; omap2_hsmmc_init(mmc); - /* link regulators to MMC adapters */ - touchbook_vmmc1_supply.dev = mmc[0].dev; - touchbook_vsim_supply.dev = mmc[0].dev; - /* REVISIT: need ehci-omap hooks for external VBUS * power switch and overcurrent detect */ diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index 30c7556..031a9a6 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c @@ -417,8 +417,6 @@ static int overo_twl_gpio_setup(struct device *dev, { omap2_hsmmc_init(mmc); - overo_vmmc1_supply.dev = mmc[0].dev; - #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c index cb012e1..8495f82 100644 --- a/arch/arm/mach-omap2/board-zoom-peripherals.c +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c @@ -270,13 +270,6 @@ static int zoom_twl_gpio_setup(struct device *dev, mmc[0].gpio_cd = gpio + 0; omap2_hsmmc_init(mmc); - /* link regulators to MMC adapters ... we "know" the - * regulators will be set up only *after* we return. - */ - zoom_vmmc1_supply.dev = mmc[0].dev; - zoom_vsim_supply.dev = mmc[0].dev; - zoom_vmmc2_supply.dev = mmc[1].dev; - ret = gpio_request_one(LCD_PANEL_ENABLE_GPIO, GPIOF_OUT_INIT_LOW, "lcd enable"); if (ret) -- 1.7.4.4 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 2/2] Remove old-style supply.dev assignments common in hsmmc init 2011-06-06 18:57 ` [PATCH 2/2] Remove old-style supply.dev assignments common in hsmmc init green @ 2011-06-06 19:25 ` Felipe Balbi 0 siblings, 0 replies; 14+ messages in thread From: Felipe Balbi @ 2011-06-06 19:25 UTC (permalink / raw) To: green Cc: linux-omap, linux-arm-kernel, Mark Brown, Mike Rapoport, Nishant Kamat, Steve Sakoman, Felipe Balbi [-- Attachment #1: Type: text/plain, Size: 484 bytes --] On Mon, Jun 06, 2011 at 02:57:08PM -0400, green@linuxhacker.ru wrote: > From: Oleg Drokin <green@linuxhacker.ru> > > CC: Mark Brown <broonie@opensource.wolfsonmicro.com> > CC: Mike Rapoport <mike@compulab.co.il> > CC: Nishant Kamat <nskamat@ti.com> > CC: Steve Sakoman <steve@sakoman.com> > CC: Felipe Balbi <balbi@ti.com> > Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Acked-by: Felipe Balbi <balbi@ti.com> compile tested with omap2plus_defconfig. -- balbi [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 490 bytes --] ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2011-06-06 19:25 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-06-06 6:46 Regulator cleanups in mach-omap2, take two green 2011-06-06 6:46 ` [PATCH 1/2] cleanup regulator supply definitions in mach-omap2 to use REGULATOR_SUPPLY green 2011-06-06 6:48 ` Santosh Shilimkar 2011-06-06 9:21 ` Felipe Balbi 2011-06-06 15:45 ` Oleg Drokin 2011-06-06 17:13 ` Felipe Balbi 2011-06-06 17:18 ` Oleg Drokin 2011-06-06 17:28 ` Felipe Balbi 2011-06-06 17:36 ` Oleg Drokin 2011-06-06 6:46 ` [PATCH 2/2] Remove old-style supply.dev assignments common in hsmmc init green 2011-06-06 9:22 ` Felipe Balbi 2011-06-06 10:13 ` Grazvydas Ignotas -- strict thread matches above, loose matches on Subject: below -- 2011-06-06 18:57 Regulator cleanups in mach-omap2, take three green 2011-06-06 18:57 ` [PATCH 2/2] Remove old-style supply.dev assignments common in hsmmc init green 2011-06-06 19:25 ` Felipe Balbi
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).