diff options
Diffstat (limited to 'arch/arm/mach-imx/mach-mx51_efikamx.c')
-rw-r--r-- | arch/arm/mach-imx/mach-mx51_efikamx.c | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/arch/arm/mach-imx/mach-mx51_efikamx.c b/arch/arm/mach-imx/mach-mx51_efikamx.c index 86e96ef11f9d..8d09c0126cab 100644 --- a/arch/arm/mach-imx/mach-mx51_efikamx.c +++ b/arch/arm/mach-imx/mach-mx51_efikamx.c | |||
@@ -207,29 +207,32 @@ static void mx51_efikamx_power_off(void) | |||
207 | 207 | ||
208 | static int __init mx51_efikamx_power_init(void) | 208 | static int __init mx51_efikamx_power_init(void) |
209 | { | 209 | { |
210 | if (machine_is_mx51_efikamx()) { | 210 | pwgt1 = regulator_get(NULL, "pwgt1"); |
211 | pwgt1 = regulator_get(NULL, "pwgt1"); | 211 | pwgt2 = regulator_get(NULL, "pwgt2"); |
212 | pwgt2 = regulator_get(NULL, "pwgt2"); | 212 | if (!IS_ERR(pwgt1) && !IS_ERR(pwgt2)) { |
213 | if (!IS_ERR(pwgt1) && !IS_ERR(pwgt2)) { | 213 | regulator_enable(pwgt1); |
214 | regulator_enable(pwgt1); | 214 | regulator_enable(pwgt2); |
215 | regulator_enable(pwgt2); | 215 | } |
216 | } | 216 | gpio_request(EFIKAMX_POWEROFF, "poweroff"); |
217 | gpio_request(EFIKAMX_POWEROFF, "poweroff"); | 217 | pm_power_off = mx51_efikamx_power_off; |
218 | pm_power_off = mx51_efikamx_power_off; | 218 | |
219 | 219 | /* enable coincell charger. maybe need a small power driver ? */ | |
220 | /* enable coincell charger. maybe need a small power driver ? */ | 220 | coincell = regulator_get(NULL, "coincell"); |
221 | coincell = regulator_get(NULL, "coincell"); | 221 | if (!IS_ERR(coincell)) { |
222 | if (!IS_ERR(coincell)) { | 222 | regulator_set_voltage(coincell, 3000000, 3000000); |
223 | regulator_set_voltage(coincell, 3000000, 3000000); | 223 | regulator_enable(coincell); |
224 | regulator_enable(coincell); | ||
225 | } | ||
226 | |||
227 | regulator_has_full_constraints(); | ||
228 | } | 224 | } |
229 | 225 | ||
226 | regulator_has_full_constraints(); | ||
227 | |||
230 | return 0; | 228 | return 0; |
231 | } | 229 | } |
232 | late_initcall(mx51_efikamx_power_init); | 230 | |
231 | static void __init mx51_efikamx_init_late(void) | ||
232 | { | ||
233 | imx51_init_late(); | ||
234 | mx51_efikamx_power_init(); | ||
235 | } | ||
233 | 236 | ||
234 | static void __init mx51_efikamx_init(void) | 237 | static void __init mx51_efikamx_init(void) |
235 | { | 238 | { |
@@ -292,5 +295,6 @@ MACHINE_START(MX51_EFIKAMX, "Genesi Efika MX (Smarttop)") | |||
292 | .handle_irq = imx51_handle_irq, | 295 | .handle_irq = imx51_handle_irq, |
293 | .timer = &mx51_efikamx_timer, | 296 | .timer = &mx51_efikamx_timer, |
294 | .init_machine = mx51_efikamx_init, | 297 | .init_machine = mx51_efikamx_init, |
298 | .init_late = mx51_efikamx_init_late, | ||
295 | .restart = mx51_efikamx_restart, | 299 | .restart = mx51_efikamx_restart, |
296 | MACHINE_END | 300 | MACHINE_END |