Patchwork [U-Boot,5/5] DRIVERS: MISC: PMIC: Modify pmic driver to support multibus I2C

login
register
mail settings
Submitter Piotr Wilczek
Date Sept. 24, 2012, 6:49 a.m.
Message ID <1348469362-17314-6-git-send-email-p.wilczek@samsung.com>
Download mbox | patch
Permalink /patch/186309/
State Changes Requested
Delegated to: Minkyu Kang
Headers show

Comments

Piotr Wilczek - Sept. 24, 2012, 6:49 a.m.
This patch modify Max8997 driver to support multibus I2C

Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Minkyu Kang <mk7.kang@samsung.com>
---
 drivers/misc/pmic_max8997.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

Patch

diff --git a/drivers/misc/pmic_max8997.c b/drivers/misc/pmic_max8997.c
index 62dbc05..c6e2d98 100644
--- a/drivers/misc/pmic_max8997.c
+++ b/drivers/misc/pmic_max8997.c
@@ -37,7 +37,10 @@  int pmic_init(void)
 	p->number_of_regs = PMIC_NUM_OF_REGS;
 	p->hw.i2c.addr = MAX8997_I2C_ADDR;
 	p->hw.i2c.tx_num = 1;
-	p->bus = I2C_PMIC;
-
+#ifdef CONFIG_PMIC_BUS_NUM
+	p->bus = CONFIG_PMIC_BUS_NUM;
+#else
+	p->bus =  I2C_PMIC;
+#endif
 	return 0;
 }