public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/3] pmic: dialog: Avoid name conflicts
@ 2012-05-07 20:25 Fabio Estevam
  2012-05-07 20:25 ` [U-Boot] [PATCH 2/4] mx53loco: Add mc34708 support and set mx53 frequency at 1GHz Fabio Estevam
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Fabio Estevam @ 2012-05-07 20:25 UTC (permalink / raw)
  To: u-boot

From: Fabio Estevam <fabio.estevam@freescale.com>

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>
---
 board/freescale/mx53loco/mx53loco.c |    2 +-
 drivers/misc/pmic_dialog.c          |    4 ++--
 include/dialog_pmic.h               |    2 +-
 include/pmic.h                      |    1 +
 4 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c
index 0dcec9b..7ed5c4e 100644
--- a/board/freescale/mx53loco/mx53loco.c
+++ b/board/freescale/mx53loco/mx53loco.c
@@ -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 */
diff --git a/drivers/misc/pmic_dialog.c b/drivers/misc/pmic_dialog.c
index 7242073..e97af1d 100644
--- a/drivers/misc/pmic_dialog.c
+++ b/drivers/misc/pmic_dialog.c
@@ -20,13 +20,13 @@
 #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;
diff --git a/include/dialog_pmic.h b/include/dialog_pmic.h
index b0925f5..8d43585 100644
--- a/include/dialog_pmic.h
+++ b/include/dialog_pmic.h
@@ -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
diff --git a/include/pmic.h b/include/pmic.h
index 52a1526..6a05b40 100644
--- a/include/pmic.h
+++ b/include/pmic.h
@@ -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);
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2012-05-09 12:05 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-07 20:25 [U-Boot] [PATCH 1/3] pmic: dialog: Avoid name conflicts Fabio Estevam
2012-05-07 20:25 ` [U-Boot] [PATCH 2/4] mx53loco: Add mc34708 support and set mx53 frequency at 1GHz Fabio Estevam
2012-05-09  8:57   ` Liu Hui-R64343
2012-05-09  9:11   ` Stefano Babic
2012-05-09  9:17   ` Stefano Babic
2012-05-07 20:26 ` [U-Boot] [PATCH 3/4] mx53loco: Turn on VUSB regulator Fabio Estevam
2012-05-09  8:58   ` Liu Hui-R64343
2012-05-09  9:11   ` Stefano Babic
2012-05-09  9:18   ` Stefano Babic
2012-05-07 20:26 ` [U-Boot] [PATCH 4/4] mx53loco: Add CONFIG_REVISION_TAG Fabio Estevam
2012-05-08 13:40   ` [U-Boot] [PATCH v2 " Fabio Estevam
2012-05-09  9:11     ` Stefano Babic
2012-05-09  9:18     ` Stefano Babic
2012-05-09  9:15   ` [U-Boot] [PATCH " Liu Hui-R64343
2012-05-09 11:20     ` Fabio Estevam
     [not found]       ` <AD13664F485EE54694E29A7F9D5BE1AF1898C2@039-SN2MPN1-022.039d.mgd.msft.net>
2012-05-09 12:05         ` Stefano Babic
2012-05-09  9:11 ` [U-Boot] [PATCH 1/3] pmic: dialog: Avoid name conflicts Stefano Babic
2012-05-09  9:18 ` Stefano Babic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox