[U-Boot] [PATCH v3 06/12] drivers:power:power_i2c: adapt file to new i2c framework

Piotr Wilczek p.wilczek at samsung.com
Fri May 17 14:55:49 CEST 2013


This patch repalce I2C_SET_BUS macro with i2c_set_bus_num() finction.

Signed-off-by: Piotr Wilczek <p.wilczek at samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>

---
Changes in v3:
- new patch

Changes in v2: None

 drivers/power/power_i2c.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/power/power_i2c.c b/drivers/power/power_i2c.c
index 3e5a784..e0f2092 100644
--- a/drivers/power/power_i2c.c
+++ b/drivers/power/power_i2c.c
@@ -114,7 +114,13 @@ int pmic_reg_read(struct pmic *p, u32 reg, u32 *val)
 
 int pmic_probe(struct pmic *p)
 {
+	/* this #ifdef should go away when all i2c drivers */
+	/* are adapted to the new i2c framework */
+#ifdef CONFIG_SYS_I2C
+	i2c_set_bus_num(p->bus);
+#else
 	I2C_SET_BUS(p->bus);
+#endif
 	debug("Bus: %d PMIC:%s probed!\n", p->bus, p->name);
 	if (i2c_probe(pmic_i2c_addr)) {
 		printf("Can't find PMIC:%s\n", p->name);
-- 
1.7.9.5



More information about the U-Boot mailing list