aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/mioa701.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/mioa701.c')
-rw-r--r--arch/arm/mach-pxa/mioa701.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c
index 4dc8c2ec40a9..2d28132c725b 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,38 @@ static struct wm97xx_batt_info mioa701_battery_data = {
717}; 718};
718 719
719/* 720/*
721 * Voltage regulation
722 */
723static struct regulator_consumer_supply max1586_consumers[] = {
724 {
725 .supply = "vcc_core",
726 }
727};
728
729static 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
741static struct max1586_subdev_data max1586_subdevs[] = {
742 { .name = "vcc_core", .id = MAX1586_V3,
743 .platform_data = &max1586_v3_info },
744};
745
746static struct max1586_platform_data max1586_info = {
747 .subdevs = max1586_subdevs,
748 .num_subdevs = ARRAY_SIZE(max1586_subdevs),
749 .v3_gain = MAX1586_GAIN_NO_R24, /* 700..1475 mV */
750};
751
752/*
720 * Camera interface 753 * Camera interface
721 */ 754 */
722struct pxacamera_platform_data mioa701_pxacamera_platform_data = { 755struct pxacamera_platform_data mioa701_pxacamera_platform_data = {
@@ -725,6 +758,13 @@ struct pxacamera_platform_data mioa701_pxacamera_platform_data = {
725 .mclk_10khz = 5000, 758 .mclk_10khz = 5000,
726}; 759};
727 760
761static struct i2c_board_info __initdata mioa701_pi2c_devices[] = {
762 {
763 I2C_BOARD_INFO("max1586", 0x14),
764 .platform_data = &max1586_info,
765 },
766};
767
728static struct soc_camera_link iclink = { 768static struct soc_camera_link iclink = {
729 .bus_id = 0, /* Must match id in pxa27x_device_camera in device.c */ 769 .bus_id = 0, /* Must match id in pxa27x_device_camera in device.c */
730}; 770};
@@ -825,7 +865,9 @@ static void __init mioa701_machine_init(void)
825 platform_add_devices(devices, ARRAY_SIZE(devices)); 865 platform_add_devices(devices, ARRAY_SIZE(devices));
826 gsm_init(); 866 gsm_init();
827 867
868 i2c_register_board_info(1, ARRAY_AND_SIZE(mioa701_pi2c_devices));
828 pxa_set_i2c_info(&i2c_pdata); 869 pxa_set_i2c_info(&i2c_pdata);
870 pxa27x_set_i2c_power_info(NULL);
829 pxa_set_camera_info(&mioa701_pxacamera_platform_data); 871 pxa_set_camera_info(&mioa701_pxacamera_platform_data);
830 i2c_register_board_info(0, ARRAY_AND_SIZE(mioa701_i2c_devices)); 872 i2c_register_board_info(0, ARRAY_AND_SIZE(mioa701_i2c_devices));
831} 873}