From mboxrd@z Thu Jan 1 00:00:00 1970
From: Piotr Wilczek
Date: Fri, 17 May 2013 14:55:49 +0200
Subject: [U-Boot] [PATCH v3 06/12] drivers:power:power_i2c: adapt file to
new i2c framework
In-Reply-To: <1368795355-6717-1-git-send-email-p.wilczek@samsung.com>
References: <1368795355-6717-1-git-send-email-p.wilczek@samsung.com>
Message-ID: <1368795355-6717-7-git-send-email-p.wilczek@samsung.com>
List-Id:
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
To: u-boot@lists.denx.de
This patch repalce I2C_SET_BUS macro with i2c_set_bus_num() finction.
Signed-off-by: Piotr Wilczek
Signed-off-by: Kyungmin Park
---
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