Commit ed5157e8895a6bf59a8163329639e34db0702331

Authored by Fabio Estevam
Committed by Albert ARIBAUD
1 parent bff969eaf0

pmic: dialog: Avoid name conflicts

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>

Showing 4 changed files with 5 additions and 4 deletions Side-by-side Diff

board/freescale/mx53loco/mx53loco.c
... ... @@ -322,7 +322,7 @@
322 322 unsigned int val, ret;
323 323 struct pmic *p;
324 324  
325   - pmic_init();
  325 + pmic_dialog_init();
326 326 p = get_pmic();
327 327  
328 328 /* Set VDDA to 1.25V */
drivers/misc/pmic_dialog.c
... ... @@ -20,13 +20,13 @@
20 20 #include <pmic.h>
21 21 #include <dialog_pmic.h>
22 22  
23   -int pmic_init(void)
  23 +int pmic_dialog_init(void)
24 24 {
25 25 struct pmic *p = get_pmic();
26 26 static const char name[] = "DIALOG_PMIC";
27 27  
28 28 p->name = name;
29   - p->number_of_regs = PMIC_NUM_OF_REGS;
  29 + p->number_of_regs = DIALOG_NUM_OF_REGS;
30 30  
31 31 p->interface = PMIC_I2C;
32 32 p->hw.i2c.addr = CONFIG_SYS_DIALOG_PMIC_I2C_ADDR;
include/dialog_pmic.h
... ... @@ -164,7 +164,7 @@
164 164 DA9053_GPID7_REG,
165 165 DA9053_GPID8_REG,
166 166 DA9053_GPID9_REG,
167   - PMIC_NUM_OF_REGS,
  167 + DIALOG_NUM_OF_REGS,
168 168 };
169 169  
170 170 #define DA_BUCKCORE_VBCORE_1_250V 0x1E
... ... @@ -55,6 +55,7 @@
55 55 };
56 56  
57 57 int pmic_init(void);
  58 +int pmic_dialog_init(void);
58 59 int check_reg(u32 reg);
59 60 struct pmic *get_pmic(void);
60 61 int pmic_probe(struct pmic *p);