summaryrefslogtreecommitdiff
path: root/drivers/power/as3722.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-01-25 08:26:55 -0700
committerSimon Glass <sjg@chromium.org>2015-01-29 17:09:53 -0700
commit25ab4b0303f2df5e6b94ed92e37875a7c98f4de3 (patch)
treef8fecc4b22da4c7fe5c4e6d6a6623459e255af47 /drivers/power/as3722.c
parent73845350b6281a7afeeb279475e6eb613d7a89f9 (diff)
downloadu-boot-imx-25ab4b0303f2df5e6b94ed92e37875a7c98f4de3.zip
u-boot-imx-25ab4b0303f2df5e6b94ed92e37875a7c98f4de3.tar.gz
u-boot-imx-25ab4b0303f2df5e6b94ed92e37875a7c98f4de3.tar.bz2
dm: i2c: Provide an offset length parameter where needed
Rather than assuming that the chip offset length is 1, allow it to be provided. This allows chips that don't use the default offset length to be used (at present they are only supported by the command line 'i2c' command which sets the offset length explicitly). Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'drivers/power/as3722.c')
-rw-r--r--drivers/power/as3722.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/as3722.c b/drivers/power/as3722.c
index 3aafdc9..a60bb5f 100644
--- a/drivers/power/as3722.c
+++ b/drivers/power/as3722.c
@@ -242,7 +242,7 @@ int as3722_init(struct udevice **devp)
const unsigned int address = 0x40;
int err;
- err = i2c_get_chip_for_busnum(bus, address, &pmic);
+ err = i2c_get_chip_for_busnum(bus, address, 1, &pmic);
if (err)
return err;
err = as3722_read_id(pmic, &id, &revision);