Regulator cleanups in mach-omap2, take three
Subsystems (3)
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.
PATCH 2/2 Remove old-style supply.dev assignments common in hsmmc init
From: Oleg Drokin <[email protected]>
--- 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(-)
arch/arm/mach-omap2/board-cm-t35.c +0 -4
@@ -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 ; }
arch/arm/mach-omap2/board-ldp.c +0 -2
@@ -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" )
arch/arm/mach-omap2/board-omap3beagle.c +0 -4
@@ -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)
arch/arm/mach-omap2/board-omap3evm.c +0 -4
@@ -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.
arch/arm/mach-omap2/board-omap3logic.c +0 -2
@@ -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 = {
arch/arm/mach-omap2/board-omap3stalker.c +0 -4
@@ -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.
arch/arm/mach-omap2/board-omap3touchbook.c +0 -4
@@ -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 */
arch/arm/mach-omap2/board-overo.c +0 -2
@@ -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 ;
arch/arm/mach-omap2/board-zoom-peripherals.c +0 -7
@@ -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)
Signature · 1 line
1.7.4.4
PATCH 1/2 cleanup regulator supply definitions in mach-omap2
In reply to [email protected]From: Oleg Drokin <[email protected]>
to use REGULATOR_SUPPLY arrays.
--- arch/arm/mach-omap2/board-4430sdp.c | 13 ++---- arch/arm/mach-omap2/board-cm-t35.c | 34 +++++++------- arch/arm/mach-omap2/board-devkit8000.c | 28 ++++++----- arch/arm/mach-omap2/board-igep0020.c | 27 ++++++----- arch/arm/mach-omap2/board-ldp.c | 8 ++-- arch/arm/mach-omap2/board-omap3beagle.c | 25 +++++----- arch/arm/mach-omap2/board-omap3evm.c | 41 +++++++++-------- arch/arm/mach-omap2/board-omap3logic.c | 8 ++-- arch/arm/mach-omap2/board-omap3pandora.c | 63 ++++++++++++++----------- arch/arm/mach-omap2/board-omap3stalker.c | 25 +++++----- arch/arm/mach-omap2/board-omap3touchbook.c | 32 +++++++------ arch/arm/mach-omap2/board-omap4panda.c | 16 +++---- arch/arm/mach-omap2/board-overo.c | 26 ++++++----- arch/arm/mach-omap2/board-rx51-peripherals.c | 29 +++++++----- arch/arm/mach-omap2/board-zoom-peripherals.c | 42 +++++++++--------- 15 files changed, 218 insertions(+), 199 deletions(-)
arch/arm/mach-omap2/board-4430sdp.c +4 -9
@@ -333,16 +333,11 @@ static struct omap2_hsmmc_info mmc[] = { };static struct regulator_consumer_supply sdp4430_vaux_supply[] = { - { - .supply ="vmmc" , - .dev_name ="omap_hsmmc.1" , - }, +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)
@@ -399,7 +394,7 @@ static struct regulator_init_data sdp4430_vaux1 = { | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, + .num_consumer_supplies = ARRAY_SIZE(sdp4430_vaux_supply), .consumer_supplies = sdp4430_vaux_supply, };
arch/arm/mach-omap2/board-cm-t35.c +18 -16
@@ -337,19 +337,21 @@ 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" ); +static struct regulator_consumer_supply cm_t35_vdac_supply[] = { +REGULATOR_SUPPLY ("vdda_dac" ,"omapdss_venc" ), +}; -static struct regulator_consumer_supply cm_t35_vdvi_supply = -REGULATOR_SUPPLY ("vdvi" ,"omapdss" ); +static struct regulator_consumer_supply cm_t35_vdvi_supply[] = { +REGULATOR_SUPPLY ("vdvi" ,"omapdss" ), +};/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ static struct regulator_init_data cm_t35_vmmc1 = {
@@ -362,8 +364,8 @@ static struct regulator_init_data cm_t35_vmmc1 = { | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, - .consumer_supplies = &cm_t35_vmmc1_supply, + .num_consumer_supplies = ARRAY_SIZE(cm_t35_vmmc1_supply), + .consumer_supplies = cm_t35_vmmc1_supply, };/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
@@ -377,8 +379,8 @@ static struct regulator_init_data cm_t35_vsim = { | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, - .consumer_supplies = &cm_t35_vsim_supply, + .num_consumer_supplies = ARRAY_SIZE(cm_t35_vsim_supply), + .consumer_supplies = cm_t35_vsim_supply, };/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
@@ -391,8 +393,8 @@ static struct regulator_init_data cm_t35_vdac = { .valid_ops_mask = REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, - .consumer_supplies = &cm_t35_vdac_supply, + .num_consumer_supplies = ARRAY_SIZE(cm_t35_vdac_supply), + .consumer_supplies = cm_t35_vdac_supply, };/* VPLL2 for digital video outputs */
@@ -406,8 +408,8 @@ static struct regulator_init_data cm_t35_vpll2 = { .valid_ops_mask = REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, - .consumer_supplies = &cm_t35_vdvi_supply, + .num_consumer_supplies = ARRAY_SIZE(cm_t35_vdvi_supply), + .consumer_supplies = cm_t35_vdvi_supply, }; static struct twl4030_usb_data cm_t35_usb_data = {
arch/arm/mach-omap2/board-devkit8000.c +15 -13
@@ -130,13 +130,14 @@ static void devkit8000_panel_disable_dvi(struct omap_dss_device *dssdev)gpio_set_value_cansleep (dssdev->reset_gpio,0 ); } -static struct regulator_consumer_supply devkit8000_vmmc1_supply = -REGULATOR_SUPPLY ("vmmc" ,"omap_hsmmc.0" ); - +static struct regulator_consumer_supply devkit8000_vmmc1_supply[] = { +REGULATOR_SUPPLY ("vmmc" ,"omap_hsmmc.0" ), +};/* ads7846 on SPI */ -static struct regulator_consumer_supply devkit8000_vio_supply = -REGULATOR_SUPPLY ("vcc" ,"spi2.0" ); +static struct regulator_consumer_supply devkit8000_vio_supply[] = { +REGULATOR_SUPPLY ("vcc" ,"spi2.0" ), +};static struct panel_generic_dpi_data lcd_panel = { .name ="generic" ,
@@ -186,8 +187,9 @@ static struct omap_dss_board_info devkit8000_dss_data = { .default_device = &devkit8000_lcd_device, }; -static struct regulator_consumer_supply devkit8000_vdda_dac_supply = -REGULATOR_SUPPLY ("vdda_dac" ,"omapdss_venc" ); +static struct regulator_consumer_supply devkit8000_vdda_dac_supply[] = { +REGULATOR_SUPPLY ("vdda_dac" ,"omapdss_venc" ), +};static uint32_t board_keymap[] = {KEY (0 ,0 ,KEY_1 ),
@@ -284,8 +286,8 @@ static struct regulator_init_data devkit8000_vmmc1 = { | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, - .consumer_supplies = &devkit8000_vmmc1_supply, + .num_consumer_supplies = ARRAY_SIZE(devkit8000_vmmc1_supply), + .consumer_supplies = devkit8000_vmmc1_supply, };/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
@@ -298,8 +300,8 @@ static struct regulator_init_data devkit8000_vdac = { .valid_ops_mask = REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, - .consumer_supplies = &devkit8000_vdda_dac_supply, + .num_consumer_supplies = ARRAY_SIZE(devkit8000_vdda_dac_supply), + .consumer_supplies = devkit8000_vdda_dac_supply, };/* VPLL1 for digital video outputs */
@@ -327,8 +329,8 @@ static struct regulator_init_data devkit8000_vio = { .valid_ops_mask = REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, - .consumer_supplies = &devkit8000_vio_supply, + .num_consumer_supplies = ARRAY_SIZE(devkit8000_vio_supply), + .consumer_supplies = devkit8000_vio_supply, }; static struct twl4030_usb_data devkit8000_usb_data = {
arch/arm/mach-omap2/board-igep0020.c +15 -12
@@ -222,8 +222,9 @@ static inline void __init igep2_init_smsc911x(void)static inline void __init igep2_init_smsc911x (void ) { }#endif -static struct regulator_consumer_supply igep_vmmc1_supply = -REGULATOR_SUPPLY ("vmmc" ,"omap_hsmmc.0" ); +static struct regulator_consumer_supply igep_vmmc1_supply[] = { +REGULATOR_SUPPLY ("vmmc" ,"omap_hsmmc.0" ), +};/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ static struct regulator_init_data igep_vmmc1 = {
@@ -236,12 +237,13 @@ static struct regulator_init_data igep_vmmc1 = { | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, - .consumer_supplies = &igep_vmmc1_supply, + .num_consumer_supplies = ARRAY_SIZE(igep_vmmc1_supply), + .consumer_supplies = igep_vmmc1_supply, }; -static struct regulator_consumer_supply igep_vio_supply = -REGULATOR_SUPPLY ("vmmc_aux" ,"omap_hsmmc.1" ); +static struct regulator_consumer_supply igep_vio_supply[] = { +REGULATOR_SUPPLY ("vmmc_aux" ,"omap_hsmmc.1" ), +};static struct regulator_init_data igep_vio = { .constraints = {
@@ -254,20 +256,21 @@ static struct regulator_init_data igep_vio = { | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, - .consumer_supplies = &igep_vio_supply, + .num_consumer_supplies = ARRAY_SIZE(igep_vio_supply), + .consumer_supplies = igep_vio_supply, }; -static struct regulator_consumer_supply igep_vmmc2_supply = -REGULATOR_SUPPLY ("vmmc" ,"omap_hsmmc.1" ); +static struct regulator_consumer_supply igep_vmmc2_supply[] = { +REGULATOR_SUPPLY ("vmmc" ,"omap_hsmmc.1" ), +};static struct regulator_init_data igep_vmmc2 = { .constraints = { .valid_modes_mask =REGULATOR_MODE_NORMAL , .always_on =1 , }, - .num_consumer_supplies =1 , - .consumer_supplies = &igep_vmmc2_supply, + .num_consumer_supplies =ARRAY_SIZE (igep_vmmc2_supply), + .consumer_supplies = igep_vmmc2_supply, }; static struct fixed_voltage_config igep_vwlan = {
arch/arm/mach-omap2/board-ldp.c +4 -4
@@ -213,8 +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) */
@@ -228,8 +228,8 @@ static struct regulator_init_data ldp_vmmc1 = { | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, - .consumer_supplies = &ldp_vmmc1_supply, + .num_consumer_supplies = ARRAY_SIZE(ldp_vmmc1_supply), + .consumer_supplies = ldp_vmmc1_supply, };/* ads7846 on SPI */
arch/arm/mach-omap2/board-omap3beagle.c +13 -12
@@ -210,8 +210,9 @@ static struct omap_dss_board_info beagle_dss_data = { .default_device = &beagle_dvi_device, }; -static struct regulator_consumer_supply beagle_vdac_supply = -REGULATOR_SUPPLY ("vdda_dac" ,"omapdss_venc" ); +static struct regulator_consumer_supply beagle_vdac_supply[] = { +REGULATOR_SUPPLY ("vdda_dac" ,"omapdss_venc" ), +};static struct regulator_consumer_supply beagle_vdvi_supplies[] = {REGULATOR_SUPPLY ("vdds_dsi" ,"omapdss" ),
@@ -239,12 +240,12 @@ 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[];
@@ -336,8 +337,8 @@ static struct regulator_init_data beagle_vmmc1 = { | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, - .consumer_supplies = &beagle_vmmc1_supply, + .num_consumer_supplies = ARRAY_SIZE(beagle_vmmc1_supply), + .consumer_supplies = beagle_vmmc1_supply, };/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
@@ -351,8 +352,8 @@ static struct regulator_init_data beagle_vsim = { | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, - .consumer_supplies = &beagle_vsim_supply, + .num_consumer_supplies = ARRAY_SIZE(beagle_vsim_supply), + .consumer_supplies = beagle_vsim_supply, };/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
@@ -365,8 +366,8 @@ static struct regulator_init_data beagle_vdac = { .valid_ops_mask = REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, - .consumer_supplies = &beagle_vdac_supply, + .num_consumer_supplies = ARRAY_SIZE(beagle_vdac_supply), + .consumer_supplies = beagle_vdac_supply, };/* VPLL2 for digital video outputs */
arch/arm/mach-omap2/board-omap3evm.c +22 -19
98 lines not on this page · raw message
arch/arm/mach-omap2/board-omap3logic.c +4 -4
@@ -55,8 +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) */
@@ -71,8 +71,8 @@ static struct regulator_init_data omap3logic_vmmc1 = { | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, - .consumer_supplies = &omap3logic_vmmc1_supply, + .num_consumer_supplies = ARRAY_SIZE(omap3logic_vmmc1_supply), + .consumer_supplies = omap3logic_vmmc1_supply, }; static struct twl4030_gpio_platform_data omap3logic_gpio_data = {
arch/arm/mach-omap2/board-omap3pandora.c +35 -28
127 lines not on this page · raw message
arch/arm/mach-omap2/board-omap3stalker.c +13 -12
@@ -206,12 +206,12 @@ 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) */
@@ -224,8 +224,8 @@ static struct regulator_init_data omap3stalker_vmmc1 = { .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, - .consumer_supplies = &omap3stalker_vmmc1_supply, + .num_consumer_supplies = ARRAY_SIZE(omap3stalker_vmmc1_supply), + .consumer_supplies = omap3stalker_vmmc1_supply, };/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
@@ -238,8 +238,8 @@ static struct regulator_init_data omap3stalker_vsim = { .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, - .consumer_supplies = &omap3stalker_vsim_supply, + .num_consumer_supplies = ARRAY_SIZE(omap3stalker_vsim_supply), + .consumer_supplies = omap3stalker_vsim_supply, }; static struct omap2_hsmmc_info mmc[] = {
@@ -403,8 +403,9 @@ static struct twl4030_codec_data omap3stalker_codec_data = { .audio = &omap3stalker_audio_data, }; -static struct regulator_consumer_supply omap3_stalker_vdda_dac_supply = -REGULATOR_SUPPLY ("vdda_dac" ,"omapdss_venc" ); +static struct regulator_consumer_supply omap3_stalker_vdda_dac_supply[] = { +REGULATOR_SUPPLY ("vdda_dac" ,"omapdss_venc" ), +};/* VDAC for DSS driving S-Video */ static struct regulator_init_data omap3_stalker_vdac = {
@@ -417,8 +418,8 @@ static struct regulator_init_data omap3_stalker_vdac = { .valid_ops_mask = REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, - .consumer_supplies = &omap3_stalker_vdda_dac_supply, + .num_consumer_supplies = ARRAY_SIZE(omap3_stalker_vdda_dac_supply), + .consumer_supplies = omap3_stalker_vdda_dac_supply, };/* VPLL2 for digital video outputs */
arch/arm/mach-omap2/board-omap3touchbook.c +18 -14
@@ -114,12 +114,12 @@ 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[];
@@ -167,14 +167,18 @@ static struct twl4030_gpio_platform_data touchbook_gpio_data = { .setup = touchbook_twl_gpio_setup, }; -static struct regulator_consumer_supply touchbook_vdac_supply = { +static struct regulator_consumer_supply touchbook_vdac_supply[] = { +{ .supply ="vdac" , .dev = &omap3_touchbook_lcd_device.dev, +}, }; -static struct regulator_consumer_supply touchbook_vdvi_supply = { +static struct regulator_consumer_supply touchbook_vdvi_supply[] = { +{ .supply ="vdvi" , .dev = &omap3_touchbook_lcd_device.dev, +}, };/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
@@ -188,8 +192,8 @@ static struct regulator_init_data touchbook_vmmc1 = { | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, - .consumer_supplies = &touchbook_vmmc1_supply, + .num_consumer_supplies = ARRAY_SIZE(touchbook_vmmc1_supply), + .consumer_supplies = touchbook_vmmc1_supply, };/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
@@ -203,8 +207,8 @@ static struct regulator_init_data touchbook_vsim = { | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, - .consumer_supplies = &touchbook_vsim_supply, + .num_consumer_supplies = ARRAY_SIZE(touchbook_vsim_supply), + .consumer_supplies = touchbook_vsim_supply, };/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
@@ -217,8 +221,8 @@ static struct regulator_init_data touchbook_vdac = { .valid_ops_mask = REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, - .consumer_supplies = &touchbook_vdac_supply, + .num_consumer_supplies = ARRAY_SIZE(touchbook_vdac_supply), + .consumer_supplies = touchbook_vdac_supply, };/* VPLL2 for digital video outputs */
@@ -232,8 +236,8 @@ static struct regulator_init_data touchbook_vpll2 = { .valid_ops_mask = REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, - .consumer_supplies = &touchbook_vdvi_supply, + .num_consumer_supplies = ARRAY_SIZE(touchbook_vdvi_supply), + .consumer_supplies = touchbook_vdvi_supply, }; static struct twl4030_usb_data touchbook_usb_data = {
arch/arm/mach-omap2/board-omap4panda.c +6 -10
@@ -183,23 +183,19 @@ static struct omap2_hsmmc_info mmc[] = { };static struct regulator_consumer_supply omap4_panda_vmmc_supply[] = { - { - .supply ="vmmc" , - .dev_name ="omap_hsmmc.0" , - }, +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 = { .valid_ops_mask =REGULATOR_CHANGE_STATUS , }, - .num_consumer_supplies =1 , - .consumer_supplies = &omap4_panda_vmmc5_supply, + .num_consumer_supplies =ARRAY_SIZE (omap4_panda_vmmc5_supply), + .consumer_supplies = omap4_panda_vmmc5_supply, };static struct fixed_voltage_config panda_vwlan = {
@@ -312,7 +308,7 @@ static struct regulator_init_data omap4_panda_vmmc = { | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, + .num_consumer_supplies = ARRAY_SIZE(omap4_panda_vmmc_supply), .consumer_supplies = omap4_panda_vmmc_supply, };
arch/arm/mach-omap2/board-overo.c +14 -12
@@ -74,15 +74,16 @@defined (CONFIG_TOUCHSCREEN_ADS7846_MODULE)/* fixed regulator for ads7846 */ -static struct regulator_consumer_supply ads7846_supply = -REGULATOR_SUPPLY ("vcc" ,"spi1.0" ); +static struct regulator_consumer_supply ads7846_supply[] = { +REGULATOR_SUPPLY ("vcc" ,"spi1.0" ), +};static struct regulator_init_data vads7846_regulator = { .constraints = { .valid_ops_mask =REGULATOR_CHANGE_STATUS , }, - .num_consumer_supplies =1 , - .consumer_supplies = &ads7846_supply, + .num_consumer_supplies =ARRAY_SIZE (ads7846_supply), + .consumer_supplies = ads7846_supply, };static struct fixed_voltage_config vads7846 = {
@@ -264,8 +265,9 @@ static struct omap_dss_board_info overo_dss_data = { .default_device = &overo_dvi_device, }; -static struct regulator_consumer_supply overo_vdda_dac_supply = -REGULATOR_SUPPLY ("vdda_dac" ,"omapdss_venc" ); +static struct regulator_consumer_supply overo_vdda_dac_supply[] = { +REGULATOR_SUPPLY ("vdda_dac" ,"omapdss_venc" ), +};static struct regulator_consumer_supply overo_vdds_dsi_supply[] = {REGULATOR_SUPPLY ("vdds_dsi" ,"omapdss" ),
@@ -319,8 +321,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 )
@@ -447,8 +449,8 @@ static struct regulator_init_data overo_vmmc1 = { | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, - .consumer_supplies = &overo_vmmc1_supply, + .num_consumer_supplies = ARRAY_SIZE(overo_vmmc1_supply), + .consumer_supplies = overo_vmmc1_supply, };/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
@@ -461,8 +463,8 @@ static struct regulator_init_data overo_vdac = { .valid_ops_mask = REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, - .consumer_supplies = &overo_vdda_dac_supply, + .num_consumer_supplies = ARRAY_SIZE(overo_vdda_dac_supply), + .consumer_supplies = overo_vdda_dac_supply, };/* VPLL2 for digital video outputs */
arch/arm/mach-omap2/board-rx51-peripherals.c +16 -13
@@ -358,14 +358,17 @@ static struct omap2_hsmmc_info mmc[] __initdata = { {}/* Terminator */ }; -static struct regulator_consumer_supply rx51_vmmc1_supply = -REGULATOR_SUPPLY ("vmmc" ,"omap_hsmmc.0" ); +static struct regulator_consumer_supply rx51_vmmc1_supply[] = { +REGULATOR_SUPPLY ("vmmc" ,"omap_hsmmc.0" ), +}; -static struct regulator_consumer_supply rx51_vaux3_supply = -REGULATOR_SUPPLY ("vmmc" ,"omap_hsmmc.1" ); +static struct regulator_consumer_supply rx51_vaux3_supply[] = { +REGULATOR_SUPPLY ("vmmc" ,"omap_hsmmc.1" ), +}; -static struct regulator_consumer_supply rx51_vsim_supply = -REGULATOR_SUPPLY ("vmmc_aux" ,"omap_hsmmc.1" ); +static struct regulator_consumer_supply rx51_vsim_supply[] = { +REGULATOR_SUPPLY ("vmmc_aux" ,"omap_hsmmc.1" ), +};static struct regulator_consumer_supply rx51_vmmc2_supplies[] = {/* tlv320aic3x analog supplies */
@@ -452,8 +455,8 @@ static struct regulator_init_data rx51_vaux3_mmc = { | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, - .consumer_supplies = &rx51_vaux3_supply, + .num_consumer_supplies = ARRAY_SIZE(rx51_vaux3_supply), + .consumer_supplies = rx51_vaux3_supply, }; static struct regulator_init_data rx51_vaux4 = {
@@ -479,8 +482,8 @@ static struct regulator_init_data rx51_vmmc1 = { | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, - .consumer_supplies = &rx51_vmmc1_supply, + .num_consumer_supplies = ARRAY_SIZE(rx51_vmmc1_supply), + .consumer_supplies = rx51_vmmc1_supply, }; static struct regulator_init_data rx51_vmmc2 = {
@@ -511,8 +514,8 @@ static struct regulator_init_data rx51_vsim = { .valid_ops_mask = REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, - .consumer_supplies = &rx51_vsim_supply, + .num_consumer_supplies = ARRAY_SIZE(rx51_vsim_supply), + .consumer_supplies = rx51_vsim_supply, }; static struct regulator_init_data rx51_vdac = {
@@ -526,7 +529,7 @@ static struct regulator_init_data rx51_vdac = { .valid_ops_mask = REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = 1, + .num_consumer_supplies = ARRAY_SIZE(rx51_vdac_supply), .consumer_supplies = rx51_vdac_supply, };
arch/arm/mach-omap2/board-zoom-peripherals.c +21 -21
90 lines not on this page · raw message
Signature · 1 line
1.7.4.4
PATCH 1/2 cleanup regulator supply definitions in mach-omap2
Quoted 4 lines · green at linuxhacker.ru
From: Oleg Drokin <[email protected]>
to use
REGULATOR_SUPPLYarrays.
Quoted 8 lines
CC Mark Brown <[email protected]>CC Mike Rapoport <[email protected]>CC Nishant Kamat <[email protected]>CC Steve Sakoman <[email protected]>CC Felipe Balbi <[email protected]>CC Santosh Shilimkar <[email protected]>CC peter.barada at logicpd.comSigned-off-by Oleg Drokin <[email protected]>
I also compile tested with omap2plus_defconfig against 3.0-rc2 and it's fine.
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 490 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110606/a07b47a8/attachment.sig>
PATCH 2/2 Remove old-style supply.dev assignments common in hsmmc init
In reply to [email protected]Quoted 8 lines · green at linuxhacker.ru
From: Oleg Drokin <[email protected]>
CC Mark Brown <[email protected]>CC Mike Rapoport <[email protected]>CC Nishant Kamat <[email protected]>CC Steve Sakoman <[email protected]>CC Felipe Balbi <[email protected]>Signed-off-by Oleg Drokin <[email protected]>
compile tested with omap2plus_defconfig.
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 490 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110606/da22da57/attachment.sig>
Tony Lindgren
maintainerQuoted 10 lines · green at linuxhacker.ru
Hello!
This is yet another attempt at some regulator cleanups in mach-omap2 code:
Convert all users toREGULATOR_SUPPLYinit style and drop the old-style .dev assignment common inshs_mmcinit.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).
Quoted 8 lines
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.
Thanks, applying to devel-cleanup branch for next merge window.
Tony