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, 15 insertions, 30 deletions
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c
index aec7f4214b14..aab04f33e49b 100644
--- a/arch/arm/mach-pxa/em-x270.c
+++ b/arch/arm/mach-pxa/em-x270.c
@@ -109,26 +109,7 @@ static unsigned long common_pin_config[] = {
109 GPIO111_MMC_DAT_3, 109 GPIO111_MMC_DAT_3,
110 110
111 /* LCD */ 111 /* LCD */
112 GPIO58_LCD_LDD_0, 112 GPIOxx_LCD_TFT_16BPP,
113 GPIO59_LCD_LDD_1,
114 GPIO60_LCD_LDD_2,
115 GPIO61_LCD_LDD_3,
116 GPIO62_LCD_LDD_4,
117 GPIO63_LCD_LDD_5,
118 GPIO64_LCD_LDD_6,
119 GPIO65_LCD_LDD_7,
120 GPIO66_LCD_LDD_8,
121 GPIO67_LCD_LDD_9,
122 GPIO68_LCD_LDD_10,
123 GPIO69_LCD_LDD_11,
124 GPIO70_LCD_LDD_12,
125 GPIO71_LCD_LDD_13,
126 GPIO72_LCD_LDD_14,
127 GPIO73_LCD_LDD_15,
128 GPIO74_LCD_FCLK,
129 GPIO75_LCD_LCLK,
130 GPIO76_LCD_PCLK,
131 GPIO77_LCD_BIAS,
132 113
133 /* QCI */ 114 /* QCI */
134 GPIO84_CIF_FV, 115 GPIO84_CIF_FV,
@@ -497,16 +478,15 @@ static int em_x270_usb_hub_init(void)
497 goto err_free_vbus_gpio; 478 goto err_free_vbus_gpio;
498 479
499 /* USB Hub power-on and reset */ 480 /* USB Hub power-on and reset */
500 gpio_direction_output(usb_hub_reset, 0); 481 gpio_direction_output(usb_hub_reset, 1);
482 gpio_direction_output(GPIO9_USB_VBUS_EN, 0);
501 regulator_enable(em_x270_usb_ldo); 483 regulator_enable(em_x270_usb_ldo);
502 gpio_set_value(usb_hub_reset, 1);
503 gpio_set_value(usb_hub_reset, 0); 484 gpio_set_value(usb_hub_reset, 0);
485 gpio_set_value(usb_hub_reset, 1);
504 regulator_disable(em_x270_usb_ldo); 486 regulator_disable(em_x270_usb_ldo);
505 regulator_enable(em_x270_usb_ldo); 487 regulator_enable(em_x270_usb_ldo);
506 gpio_set_value(usb_hub_reset, 1); 488 gpio_set_value(usb_hub_reset, 0);
507 489 gpio_set_value(GPIO9_USB_VBUS_EN, 1);
508 /* enable VBUS */
509 gpio_direction_output(GPIO9_USB_VBUS_EN, 1);
510 490
511 return 0; 491 return 0;
512 492
@@ -967,7 +947,7 @@ static inline void em_x270_init_gpio_keys(void) {}
967#if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE) 947#if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE)
968static struct regulator *em_x270_camera_ldo; 948static struct regulator *em_x270_camera_ldo;
969 949
970static int em_x270_sensor_init(struct device *dev) 950static int em_x270_sensor_init(void)
971{ 951{
972 int ret; 952 int ret;
973 953
@@ -996,7 +976,6 @@ static int em_x270_sensor_init(struct device *dev)
996} 976}
997 977
998struct pxacamera_platform_data em_x270_camera_platform_data = { 978struct pxacamera_platform_data em_x270_camera_platform_data = {
999 .init = em_x270_sensor_init,
1000 .flags = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 | 979 .flags = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 |
1001 PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN, 980 PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN,
1002 .mclk_10khz = 2600, 981 .mclk_10khz = 2600,
@@ -1049,8 +1028,10 @@ static struct platform_device em_x270_camera = {
1049 1028
1050static void __init em_x270_init_camera(void) 1029static void __init em_x270_init_camera(void)
1051{ 1030{
1052 pxa_set_camera_info(&em_x270_camera_platform_data); 1031 if (em_x270_sensor_init() == 0) {
1053 platform_device_register(&em_x270_camera); 1032 pxa_set_camera_info(&em_x270_camera_platform_data);
1033 platform_device_register(&em_x270_camera);
1034 }
1054} 1035}
1055#else 1036#else
1056static inline void em_x270_init_camera(void) {} 1037static inline void em_x270_init_camera(void) {}
@@ -1286,6 +1267,10 @@ static void __init em_x270_init(void)
1286{ 1267{
1287 pxa2xx_mfp_config(ARRAY_AND_SIZE(common_pin_config)); 1268 pxa2xx_mfp_config(ARRAY_AND_SIZE(common_pin_config));
1288 1269
1270 pxa_set_ffuart_info(NULL);
1271 pxa_set_btuart_info(NULL);
1272 pxa_set_stuart_info(NULL);
1273
1289#ifdef CONFIG_PM 1274#ifdef CONFIG_PM
1290 pxa27x_set_pwrmode(PWRMODE_DEEPSLEEP); 1275 pxa27x_set_pwrmode(PWRMODE_DEEPSLEEP);
1291#endif 1276#endif