aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/em-x270.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/em-x270.c')
-rw-r--r--arch/arm/mach-pxa/em-x270.c45
1 files changed, 30 insertions, 15 deletions
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c
index 9cd09465a0e8..aec7f4214b14 100644
--- a/arch/arm/mach-pxa/em-x270.c
+++ b/arch/arm/mach-pxa/em-x270.c
@@ -646,13 +646,16 @@ static int em_x270_mci_get_ro(struct device *dev)
646} 646}
647 647
648static struct pxamci_platform_data em_x270_mci_platform_data = { 648static struct pxamci_platform_data em_x270_mci_platform_data = {
649 .ocr_mask = MMC_VDD_20_21|MMC_VDD_21_22|MMC_VDD_22_23| 649 .ocr_mask = MMC_VDD_20_21|MMC_VDD_21_22|MMC_VDD_22_23|
650 MMC_VDD_24_25|MMC_VDD_25_26|MMC_VDD_26_27| 650 MMC_VDD_24_25|MMC_VDD_25_26|MMC_VDD_26_27|
651 MMC_VDD_27_28|MMC_VDD_28_29|MMC_VDD_29_30| 651 MMC_VDD_27_28|MMC_VDD_28_29|MMC_VDD_29_30|
652 MMC_VDD_30_31|MMC_VDD_31_32, 652 MMC_VDD_30_31|MMC_VDD_31_32,
653 .init = em_x270_mci_init, 653 .init = em_x270_mci_init,
654 .setpower = em_x270_mci_setpower, 654 .setpower = em_x270_mci_setpower,
655 .exit = em_x270_mci_exit, 655 .exit = em_x270_mci_exit,
656 .gpio_card_detect = -1,
657 .gpio_card_ro = -1,
658 .gpio_power = -1,
656}; 659};
657 660
658static void __init em_x270_init_mmc(void) 661static void __init em_x270_init_mmc(void)
@@ -1022,22 +1025,32 @@ static int em_x270_sensor_power(struct device *dev, int on)
1022 return 0; 1025 return 0;
1023} 1026}
1024 1027
1025static struct soc_camera_link iclink = {
1026 .bus_id = 0,
1027 .power = em_x270_sensor_power,
1028};
1029
1030static struct i2c_board_info em_x270_i2c_cam_info[] = { 1028static struct i2c_board_info em_x270_i2c_cam_info[] = {
1031 { 1029 {
1032 I2C_BOARD_INFO("mt9m111", 0x48), 1030 I2C_BOARD_INFO("mt9m111", 0x48),
1031 },
1032};
1033
1034static struct soc_camera_link iclink = {
1035 .bus_id = 0,
1036 .power = em_x270_sensor_power,
1037 .board_info = &em_x270_i2c_cam_info[0],
1038 .i2c_adapter_id = 0,
1039 .module_name = "mt9m111",
1040};
1041
1042static struct platform_device em_x270_camera = {
1043 .name = "soc-camera-pdrv",
1044 .id = -1,
1045 .dev = {
1033 .platform_data = &iclink, 1046 .platform_data = &iclink,
1034 }, 1047 },
1035}; 1048};
1036 1049
1037static void __init em_x270_init_camera(void) 1050static void __init em_x270_init_camera(void)
1038{ 1051{
1039 i2c_register_board_info(0, ARRAY_AND_SIZE(em_x270_i2c_cam_info));
1040 pxa_set_camera_info(&em_x270_camera_platform_data); 1052 pxa_set_camera_info(&em_x270_camera_platform_data);
1053 platform_device_register(&em_x270_camera);
1041} 1054}
1042#else 1055#else
1043static inline void em_x270_init_camera(void) {} 1056static inline void em_x270_init_camera(void) {}
@@ -1103,6 +1116,7 @@ REGULATOR_CONSUMER(ldo5, NULL, "vcc cam");
1103REGULATOR_CONSUMER(ldo10, &pxa_device_mci.dev, "vcc sdio"); 1116REGULATOR_CONSUMER(ldo10, &pxa_device_mci.dev, "vcc sdio");
1104REGULATOR_CONSUMER(ldo12, NULL, "vcc usb"); 1117REGULATOR_CONSUMER(ldo12, NULL, "vcc usb");
1105REGULATOR_CONSUMER(ldo19, &em_x270_gprs_userspace_consumer.dev, "vcc gprs"); 1118REGULATOR_CONSUMER(ldo19, &em_x270_gprs_userspace_consumer.dev, "vcc gprs");
1119REGULATOR_CONSUMER(buck2, NULL, "vcc_core");
1106 1120
1107#define REGULATOR_INIT(_ldo, _min_uV, _max_uV, _ops_mask) \ 1121#define REGULATOR_INIT(_ldo, _min_uV, _max_uV, _ops_mask) \
1108 static struct regulator_init_data _ldo##_data = { \ 1122 static struct regulator_init_data _ldo##_data = { \
@@ -1125,6 +1139,7 @@ REGULATOR_INIT(ldo10, 2000000, 3200000,
1125 REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_VOLTAGE); 1139 REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_VOLTAGE);
1126REGULATOR_INIT(ldo12, 3000000, 3000000, REGULATOR_CHANGE_STATUS); 1140REGULATOR_INIT(ldo12, 3000000, 3000000, REGULATOR_CHANGE_STATUS);
1127REGULATOR_INIT(ldo19, 3200000, 3200000, REGULATOR_CHANGE_STATUS); 1141REGULATOR_INIT(ldo19, 3200000, 3200000, REGULATOR_CHANGE_STATUS);
1142REGULATOR_INIT(buck2, 1000000, 1650000, REGULATOR_CHANGE_VOLTAGE);
1128 1143
1129struct led_info em_x270_led_info = { 1144struct led_info em_x270_led_info = {
1130 .name = "em-x270:orange", 1145 .name = "em-x270:orange",
@@ -1194,6 +1209,8 @@ struct da903x_subdev_info em_x270_da9030_subdevs[] = {
1194 DA9030_LDO(12), 1209 DA9030_LDO(12),
1195 DA9030_LDO(19), 1210 DA9030_LDO(19),
1196 1211
1212 DA9030_SUBDEV(regulator, BUCK2, &buck2_data),
1213
1197 DA9030_SUBDEV(led, LED_PC, &em_x270_led_info), 1214 DA9030_SUBDEV(led, LED_PC, &em_x270_led_info),
1198 DA9030_SUBDEV(backlight, WLED, &em_x270_led_info), 1215 DA9030_SUBDEV(backlight, WLED, &em_x270_led_info),
1199 DA9030_SUBDEV(battery, BAT, &em_x270_batterty_info), 1216 DA9030_SUBDEV(battery, BAT, &em_x270_batterty_info),
@@ -1245,7 +1262,6 @@ static void __init em_x270_init_i2c(void)
1245 1262
1246static void __init em_x270_module_init(void) 1263static void __init em_x270_module_init(void)
1247{ 1264{
1248 pr_info("%s\n", __func__);
1249 pxa2xx_mfp_config(ARRAY_AND_SIZE(em_x270_pin_config)); 1265 pxa2xx_mfp_config(ARRAY_AND_SIZE(em_x270_pin_config));
1250 1266
1251 mmc_cd = GPIO13_MMC_CD; 1267 mmc_cd = GPIO13_MMC_CD;
@@ -1257,7 +1273,6 @@ static void __init em_x270_module_init(void)
1257 1273
1258static void __init em_x270_exeda_init(void) 1274static void __init em_x270_exeda_init(void)
1259{ 1275{
1260 pr_info("%s\n", __func__);
1261 pxa2xx_mfp_config(ARRAY_AND_SIZE(exeda_pin_config)); 1276 pxa2xx_mfp_config(ARRAY_AND_SIZE(exeda_pin_config));
1262 1277
1263 mmc_cd = GPIO114_MMC_CD; 1278 mmc_cd = GPIO114_MMC_CD;