Patchwork [U-Boot,v2,5/9] power: fix pmic command

login
register
mail settings
Submitter Piotr Wilczek
Date April 4, 2013, 11:13 a.m.
Message ID <1365074001-5360-6-git-send-email-p.wilczek@samsung.com>
Download mbox | patch
Permalink /patch/233716/
State Changes Requested
Delegated to: Minkyu Kang
Headers show

Comments

Piotr Wilczek - April 4, 2013, 11:13 a.m.
This patch fix automatic i2c bus change when calling subsequent
'pmic' command on diffrent devices connected to separete i2c bus.

Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Lukasz Majewski <l.majewski@samsung.com>

---
Changes in v2:
- new patch

 drivers/power/power_core.c |    2 ++
 1 file changed, 2 insertions(+)

Patch

diff --git a/drivers/power/power_core.c b/drivers/power/power_core.c
index 90df2c5..0b1b725 100644
--- a/drivers/power/power_core.c
+++ b/drivers/power/power_core.c
@@ -164,6 +164,8 @@  int do_pmic(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	if (!p)
 		return CMD_RET_FAILURE;
 
+	I2C_SET_BUS(p->bus);
+
 	if (strcmp(cmd, "dump") == 0) {
 		if (pmic_dump(p))
 			return CMD_RET_FAILURE;