diff options
author | Nancy Chen <Nancy.Chen@freescale.com> | 2008-04-04 14:49:59 -0500 |
---|---|---|
committer | Daniel Schaeffer <daniel.schaeffer@timesys.com> | 2008-08-25 15:20:59 -0400 |
commit | 260f43d3c0941b3b889f925e5adcdcc97894dec5 (patch) | |
tree | b179a8e36ce24830444e794e4cad8d1adefad7eb /arch/arm/mach-mx3 | |
parent | 346043811027b82e86b137e58b48bc632b16a15c (diff) |
ENGR00071499 MX31_3stack: Make GPO3 and GPO4 parent GPO1
Set regulator GPO1 to be the parent of regulator GPO3 and GPO4 for MX31_3stack
Signed-off-by: Nancy Chen <Nancy.Chen@freescale.com>
Diffstat (limited to 'arch/arm/mach-mx3')
-rw-r--r-- | arch/arm/mach-mx3/mx3_3stack.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/arch/arm/mach-mx3/mx3_3stack.c b/arch/arm/mach-mx3/mx3_3stack.c index 78c1fe03f606..38de0e88b77f 100644 --- a/arch/arm/mach-mx3/mx3_3stack.c +++ b/arch/arm/mach-mx3/mx3_3stack.c @@ -563,16 +563,29 @@ static int __init mxc_expio_init(void) static int __init mxc_init_regulator(void) { + int err; struct regulator *gpo1; struct regulator *gpo2; + struct regulator *gpo3; + struct regulator *gpo4; gpo1 = regulator_get(NULL, "GPO1"); gpo2 = regulator_get(NULL, "GPO2"); - if (!(IS_ERR(gpo1) || IS_ERR(gpo2))) - regulator_set_platform_source(gpo2, gpo1); - else + gpo3 = regulator_get(NULL, "GPO3"); + gpo4 = regulator_get(NULL, "GPO4"); + + err = regulator_set_platform_source(gpo2, gpo1); + if (err) printk(KERN_ERR "Unable to set GPO1 be the parent of GPO2\n"); + err = regulator_set_platform_source(gpo3, gpo1); + if (err) + printk(KERN_ERR "Unable to set GPO1 be the parent of GPO3\n"); + + err = regulator_set_platform_source(gpo4, gpo1); + if (err) + printk(KERN_ERR "Unable to set GPO1 be the parent of GPO4\n"); + return 0; } @@ -796,11 +809,11 @@ static void __init mxc_init_pata(void) { (void)platform_device_register(&pata_fsl_device); } -#else /* CONFIG_PATA_FSL */ +#else /* CONFIG_PATA_FSL */ static void __init mxc_init_pata(void) { } -#endif /* CONFIG_PATA_FSL */ +#endif /* CONFIG_PATA_FSL */ /*! * Board specific initialization. |