]> git.sur5r.net Git - u-boot/commitdiff
pmic: dialog: Avoid name conflicts
authorFabio Estevam <fabio.estevam@freescale.com>
Mon, 7 May 2012 10:25:58 +0000 (10:25 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Tue, 15 May 2012 06:31:34 +0000 (08:31 +0200)
As mx53loco board has two variants: one with Dialog PMIC and another with FSL MC34708 PMIC,
we need to be able to build both drivers.

Change pmic_init() and PMIC_NUM_OF_REGS names to avoid build conflicts when both drivers are present.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
board/freescale/mx53loco/mx53loco.c
drivers/misc/pmic_dialog.c
include/dialog_pmic.h
include/pmic.h

index 0dcec9b987bf90a1bacba714fd650547fab3c1e5..7ed5c4e4dacbac8c0e8d184f335a4832edf473cd 100644 (file)
@@ -322,7 +322,7 @@ static int power_init(void)
        unsigned int val, ret;
        struct pmic *p;
 
-       pmic_init();
+       pmic_dialog_init();
        p = get_pmic();
 
        /* Set VDDA to 1.25V */
index 724207349c54cb2f66d3d15e02884a0f298e7d41..e97af1d1d01a3020516f83fa7ef3b6ccee2ec9a2 100644 (file)
 #include <pmic.h>
 #include <dialog_pmic.h>
 
-int pmic_init(void)
+int pmic_dialog_init(void)
 {
        struct pmic *p = get_pmic();
        static const char name[] = "DIALOG_PMIC";
 
        p->name = name;
-       p->number_of_regs = PMIC_NUM_OF_REGS;
+       p->number_of_regs = DIALOG_NUM_OF_REGS;
 
        p->interface = PMIC_I2C;
        p->hw.i2c.addr = CONFIG_SYS_DIALOG_PMIC_I2C_ADDR;
index b0925f5ce7e982dc9dd605b134dc59f9c39d5925..8d43585e2427fca6e7247996cfb97487b47a15c2 100644 (file)
@@ -164,7 +164,7 @@ enum {
        DA9053_GPID7_REG,
        DA9053_GPID8_REG,
        DA9053_GPID9_REG,
-       PMIC_NUM_OF_REGS,
+       DIALOG_NUM_OF_REGS,
 };
 
 #define DA_BUCKCORE_VBCORE_1_250V              0x1E
index 52a1526d951c407cc337bfd1f5426d3cd8212953..6a05b40aefe34f05a7bd1265772b7b0e2b7e4b3c 100644 (file)
@@ -55,6 +55,7 @@ struct pmic {
 };
 
 int pmic_init(void);
+int pmic_dialog_init(void);
 int check_reg(u32 reg);
 struct pmic *get_pmic(void);
 int pmic_probe(struct pmic *p);