diff options
Diffstat (limited to 'arch/arm/mach-imx/mach-mx51_efikasb.c')
-rw-r--r-- | arch/arm/mach-imx/mach-mx51_efikasb.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/arch/arm/mach-imx/mach-mx51_efikasb.c b/arch/arm/mach-imx/mach-mx51_efikasb.c index 88f837a6cc76..fdbd181b97ef 100644 --- a/arch/arm/mach-imx/mach-mx51_efikasb.c +++ b/arch/arm/mach-imx/mach-mx51_efikasb.c | |||
@@ -211,22 +211,25 @@ static void mx51_efikasb_power_off(void) | |||
211 | 211 | ||
212 | static int __init mx51_efikasb_power_init(void) | 212 | static int __init mx51_efikasb_power_init(void) |
213 | { | 213 | { |
214 | if (machine_is_mx51_efikasb()) { | 214 | pwgt1 = regulator_get(NULL, "pwgt1"); |
215 | pwgt1 = regulator_get(NULL, "pwgt1"); | 215 | pwgt2 = regulator_get(NULL, "pwgt2"); |
216 | pwgt2 = regulator_get(NULL, "pwgt2"); | 216 | if (!IS_ERR(pwgt1) && !IS_ERR(pwgt2)) { |
217 | if (!IS_ERR(pwgt1) && !IS_ERR(pwgt2)) { | 217 | regulator_enable(pwgt1); |
218 | regulator_enable(pwgt1); | 218 | regulator_enable(pwgt2); |
219 | regulator_enable(pwgt2); | ||
220 | } | ||
221 | gpio_request(EFIKASB_POWEROFF, "poweroff"); | ||
222 | pm_power_off = mx51_efikasb_power_off; | ||
223 | |||
224 | regulator_has_full_constraints(); | ||
225 | } | 219 | } |
220 | gpio_request(EFIKASB_POWEROFF, "poweroff"); | ||
221 | pm_power_off = mx51_efikasb_power_off; | ||
222 | |||
223 | regulator_has_full_constraints(); | ||
226 | 224 | ||
227 | return 0; | 225 | return 0; |
228 | } | 226 | } |
229 | late_initcall(mx51_efikasb_power_init); | 227 | |
228 | static void __init mx51_efikasb_init_late(void) | ||
229 | { | ||
230 | imx51_init_late(); | ||
231 | mx51_efikasb_power_init(); | ||
232 | } | ||
230 | 233 | ||
231 | /* 01 R1.3 board | 234 | /* 01 R1.3 board |
232 | 10 R2.0 board */ | 235 | 10 R2.0 board */ |
@@ -287,6 +290,7 @@ MACHINE_START(MX51_EFIKASB, "Genesi Efika MX (Smartbook)") | |||
287 | .init_irq = mx51_init_irq, | 290 | .init_irq = mx51_init_irq, |
288 | .handle_irq = imx51_handle_irq, | 291 | .handle_irq = imx51_handle_irq, |
289 | .init_machine = efikasb_board_init, | 292 | .init_machine = efikasb_board_init, |
293 | .init_late = mx51_efikasb_init_late, | ||
290 | .timer = &mx51_efikasb_timer, | 294 | .timer = &mx51_efikasb_timer, |
291 | .restart = mxc_restart, | 295 | .restart = mxc_restart, |
292 | MACHINE_END | 296 | MACHINE_END |