omap: rx51: Use REGULATOR_SUPPLY macro when initializing regulator consumers
Subsystems (3)
PATCH v2 1/2 omap: rx51: Use REGULATOR_SUPPLY macro when initializing regulator consumers
There is REGULATOR_SUPPLY macro available for initializing the struct regulator_consumer_supply so use it where applicable (all other supplies than vdds_sdi) as it improves the readability.
---
v2:
No functional changes but short description added, rebased on top of 7b93a0d and added Eduardo's ack to v1.
--- arch/arm/mach-omap2/board-rx51-peripherals.c | 43 ++++++------------------- 1 files changed, 11 insertions(+), 32 deletions(-)
arch/arm/mach-omap2/board-rx51-peripherals.c +11 -32
@@ -272,48 +272,27 @@ static struct omap2_hsmmc_info mmc[] __initdata = { {}/* Terminator */ }; -static struct regulator_consumer_supply rx51_vmmc1_supply = { - .supply ="vmmc" , - .dev_name ="mmci-omap-hs.0" , -}; +static struct regulator_consumer_supply rx51_vmmc1_supply = +REGULATOR_SUPPLY ("vmmc" ,"mmci-omap-hs.0" ); -static struct regulator_consumer_supply rx51_vaux3_supply = { - .supply ="vmmc" , - .dev_name ="mmci-omap-hs.1" , -}; +static struct regulator_consumer_supply rx51_vaux3_supply = +REGULATOR_SUPPLY ("vmmc" ,"mmci-omap-hs.1" ); -static struct regulator_consumer_supply rx51_vsim_supply = { - .supply ="vmmc_aux" , - .dev_name ="mmci-omap-hs.1" , -}; +static struct regulator_consumer_supply rx51_vsim_supply = +REGULATOR_SUPPLY ("vmmc_aux" ,"mmci-omap-hs.1" );static struct regulator_consumer_supply rx51_vmmc2_supplies[] = {/* tlv320aic3x analog supplies */ - { - .supply ="AVDD" , - .dev_name ="2-0018" , - }, - { - .supply ="DRVDD" , - .dev_name ="2-0018" , - }, +REGULATOR_SUPPLY ("AVDD" ,"2-0018" ), +REGULATOR_SUPPLY ("DRVDD" ,"2-0018" ),/* Keep vmmc as last item. It is not iterated for newer boards */ - { - .supply ="vmmc" , - .dev_name ="mmci-omap-hs.1" , - }, +REGULATOR_SUPPLY ("vmmc" ,"mmci-omap-hs.1" ), };static struct regulator_consumer_supply rx51_vio_supplies[] = {/* tlv320aic3x digital supplies */ - { - .supply ="IOVDD" , - .dev_name ="2-0018" - }, - { - .supply ="DVDD" , - .dev_name ="2-0018" - }, +REGULATOR_SUPPLY ("IOVDD" ,"2-0018" ), +REGULATOR_SUPPLY ("DVDD" ,"2-0018" ), };#if defined(CONFIG_FB_OMAP2 ) || defined(CONFIG_FB_OMAP2_MODULE )
Signature · 1 line
1.7.1
PATCH v2 2/2 omap: rx51: Add supply and data for the tpa6130a2 headphone amplifier
With these and upcoming change to tpa6130a2 driver it's possible to add support for the TPA6130A2 headphone amplifier.
---
v2:
- Rebased on top of 7b93a0d
- Only Vdd supply added as the CPVSS turned out to be miss defined in tpa6130a2. Thanks to Eduardo Valentin <[email protected]> for noticing.
--- arch/arm/mach-omap2/board-rx51-peripherals.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/board-rx51-peripherals.c +13 -0
@@ -33,6 +33,8 @@#include <plat/onenand.h> #include <plat/gpmc-smc91x.h> +#include <sound/tpa6130a2-plat.h> +#include "mux.h" #include "hsmmc.h"
@@ -285,6 +287,8 @@ static struct regulator_consumer_supply rx51_vmmc2_supplies[] = {/* tlv320aic3x analog supplies */ REGULATOR_SUPPLY ("AVDD" ,"2-0018" ),REGULATOR_SUPPLY ("DRVDD" ,"2-0018" ), +/* tpa6130a2 */ +REGULATOR_SUPPLY ("Vdd" ,"2-0060" ),/* Keep vmmc as last item. It is not iterated for newer boards */ REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"), };
@@ -667,10 +671,19 @@ static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_1[] = { }, }; +static struct tpa6130a2_platform_data rx51_tpa6130a2_data__initdata = { + .id =TPA6130A2 , + .power_gpio =98 , +}; +static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_2[] = { {I2C_BOARD_INFO ("tlv320aic3x" ,0x18 ), }, + { +I2C_BOARD_INFO ("tpa6130a2" ,0x60 ), + .platform_data = &rx51_tpa6130a2_data, + } };static int __init rx51_i2c_init (void )
Signature · 1 line
1.7.1