diff options
-rw-r--r-- | arch/arm/mach-pxa/mioa701.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c index 4dc8c2ec40a9..99e5a880a4ad 100644 --- a/arch/arm/mach-pxa/mioa701.c +++ b/arch/arm/mach-pxa/mioa701.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/wm97xx_batt.h> | 37 | #include <linux/wm97xx_batt.h> |
38 | #include <linux/mtd/physmap.h> | 38 | #include <linux/mtd/physmap.h> |
39 | #include <linux/usb/gpio_vbus.h> | 39 | #include <linux/usb/gpio_vbus.h> |
40 | #include <linux/regulator/max1586.h> | ||
40 | 41 | ||
41 | #include <asm/mach-types.h> | 42 | #include <asm/mach-types.h> |
42 | #include <asm/mach/arch.h> | 43 | #include <asm/mach/arch.h> |
@@ -717,6 +718,37 @@ static struct wm97xx_batt_info mioa701_battery_data = { | |||
717 | }; | 718 | }; |
718 | 719 | ||
719 | /* | 720 | /* |
721 | * Voltage regulation | ||
722 | */ | ||
723 | static struct regulator_consumer_supply max1586_consumers[] = { | ||
724 | { | ||
725 | .supply = "vcc_core", | ||
726 | } | ||
727 | }; | ||
728 | |||
729 | static struct regulator_init_data max1586_v3_info = { | ||
730 | .constraints = { | ||
731 | .name = "vcc_core range", | ||
732 | .min_uV = 1000000, | ||
733 | .max_uV = 1705000, | ||
734 | .always_on = 1, | ||
735 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, | ||
736 | }, | ||
737 | .num_consumer_supplies = ARRAY_SIZE(max1586_consumers), | ||
738 | .consumer_supplies = max1586_consumers, | ||
739 | }; | ||
740 | |||
741 | static struct max1586_subdev_data max1586_subdevs[] = { | ||
742 | { .name = "vcc_core", .id = MAX1586_V3, | ||
743 | .platform_data = &max1586_v3_info }, | ||
744 | }; | ||
745 | |||
746 | static struct max1586_platform_data max1586_info = { | ||
747 | .subdevs = max1586_subdevs, | ||
748 | .num_subdevs = ARRAY_SIZE(max1586_subdevs), | ||
749 | }; | ||
750 | |||
751 | /* | ||
720 | * Camera interface | 752 | * Camera interface |
721 | */ | 753 | */ |
722 | struct pxacamera_platform_data mioa701_pxacamera_platform_data = { | 754 | struct pxacamera_platform_data mioa701_pxacamera_platform_data = { |
@@ -725,6 +757,13 @@ struct pxacamera_platform_data mioa701_pxacamera_platform_data = { | |||
725 | .mclk_10khz = 5000, | 757 | .mclk_10khz = 5000, |
726 | }; | 758 | }; |
727 | 759 | ||
760 | static struct i2c_board_info __initdata mioa701_pi2c_devices[] = { | ||
761 | { | ||
762 | I2C_BOARD_INFO("max1586", 0x14), | ||
763 | .platform_data = &max1586_info, | ||
764 | }, | ||
765 | }; | ||
766 | |||
728 | static struct soc_camera_link iclink = { | 767 | static struct soc_camera_link iclink = { |
729 | .bus_id = 0, /* Must match id in pxa27x_device_camera in device.c */ | 768 | .bus_id = 0, /* Must match id in pxa27x_device_camera in device.c */ |
730 | }; | 769 | }; |
@@ -825,7 +864,9 @@ static void __init mioa701_machine_init(void) | |||
825 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 864 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
826 | gsm_init(); | 865 | gsm_init(); |
827 | 866 | ||
867 | i2c_register_board_info(1, ARRAY_AND_SIZE(mioa701_pi2c_devices)); | ||
828 | pxa_set_i2c_info(&i2c_pdata); | 868 | pxa_set_i2c_info(&i2c_pdata); |
869 | pxa27x_set_i2c_power_info(NULL); | ||
829 | pxa_set_camera_info(&mioa701_pxacamera_platform_data); | 870 | pxa_set_camera_info(&mioa701_pxacamera_platform_data); |
830 | i2c_register_board_info(0, ARRAY_AND_SIZE(mioa701_i2c_devices)); | 871 | i2c_register_board_info(0, ARRAY_AND_SIZE(mioa701_i2c_devices)); |
831 | } | 872 | } |