aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-pxa/balloon3.c55
1 files changed, 55 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c
index e2eb0b79634e..9041340fee1d 100644
--- a/arch/arm/mach-pxa/balloon3.c
+++ b/arch/arm/mach-pxa/balloon3.c
@@ -29,6 +29,7 @@
29#include <linux/i2c/pcf857x.h> 29#include <linux/i2c/pcf857x.h>
30#include <linux/mtd/nand.h> 30#include <linux/mtd/nand.h>
31#include <linux/mtd/physmap.h> 31#include <linux/mtd/physmap.h>
32#include <linux/regulator/max1586.h>
32 33
33#include <asm/setup.h> 34#include <asm/setup.h>
34#include <asm/mach-types.h> 35#include <asm/mach-types.h>
@@ -680,6 +681,59 @@ static inline void balloon3_nand_init(void) {}
680#endif 681#endif
681 682
682/****************************************************************************** 683/******************************************************************************
684 * Core power regulator
685 ******************************************************************************/
686#if defined(CONFIG_REGULATOR_MAX1586) || \
687 defined(CONFIG_REGULATOR_MAX1586_MODULE)
688static struct regulator_consumer_supply balloon3_max1587a_consumers[] = {
689 {
690 .supply = "vcc_core",
691 }
692};
693
694static struct regulator_init_data balloon3_max1587a_v3_info = {
695 .constraints = {
696 .name = "vcc_core range",
697 .min_uV = 900000,
698 .max_uV = 1705000,
699 .always_on = 1,
700 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
701 },
702 .consumer_supplies = balloon3_max1587a_consumers,
703 .num_consumer_supplies = ARRAY_SIZE(balloon3_max1587a_consumers),
704};
705
706static struct max1586_subdev_data balloon3_max1587a_subdevs[] = {
707 {
708 .name = "vcc_core",
709 .id = MAX1586_V3,
710 .platform_data = &balloon3_max1587a_v3_info,
711 }
712};
713
714static struct max1586_platform_data balloon3_max1587a_info = {
715 .subdevs = balloon3_max1587a_subdevs,
716 .num_subdevs = ARRAY_SIZE(balloon3_max1587a_subdevs),
717 .v3_gain = MAX1586_GAIN_R24_3k32, /* 730..1550 mV */
718};
719
720static struct i2c_board_info __initdata balloon3_pi2c_board_info[] = {
721 {
722 I2C_BOARD_INFO("max1586", 0x14),
723 .platform_data = &balloon3_max1587a_info,
724 },
725};
726
727static void __init balloon3_pmic_init(void)
728{
729 pxa27x_set_i2c_power_info(NULL);
730 i2c_register_board_info(1, ARRAY_AND_SIZE(balloon3_pi2c_board_info));
731}
732#else
733static inline void balloon3_pmic_init(void) {}
734#endif
735
736/******************************************************************************
683 * Machine init 737 * Machine init
684 ******************************************************************************/ 738 ******************************************************************************/
685static void __init balloon3_init(void) 739static void __init balloon3_init(void)
@@ -699,6 +753,7 @@ static void __init balloon3_init(void)
699 balloon3_mmc_init(); 753 balloon3_mmc_init();
700 balloon3_nand_init(); 754 balloon3_nand_init();
701 balloon3_nor_init(); 755 balloon3_nor_init();
756 balloon3_pmic_init();
702 balloon3_ts_init(); 757 balloon3_ts_init();
703 balloon3_udc_init(); 758 balloon3_udc_init();
704 balloon3_uhc_init(); 759 balloon3_uhc_init();