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

Message ID 1368795355-6717-7-git-send-email-p.wilczek@samsung.com
State Changes Requested
Delegated to: Minkyu Kang
Headers show

Commit Message

Piotr Wilczek May 17, 2013, 12:55 p.m.
This patch repalce I2C_SET_BUS macro with i2c_set_bus_num() finction.

Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@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);
 	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);