summaryrefslogtreecommitdiff
path: root/drivers/i2c/sandbox_i2c.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/i2c/sandbox_i2c.c
parent73845350b6281a7afeeb279475e6eb613d7a89f9 (diff)
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/i2c/sandbox_i2c.c')
-rw-r--r--drivers/i2c/sandbox_i2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/sandbox_i2c.c b/drivers/i2c/sandbox_i2c.c
index f0e9f51a1f..e2f6c3b9bb 100644
--- a/drivers/i2c/sandbox_i2c.c
+++ b/drivers/i2c/sandbox_i2c.c
@@ -60,7 +60,7 @@ static int sandbox_i2c_xfer(struct udevice *bus, struct i2c_msg *msg,
if (msg->addr == SANDBOX_I2C_TEST_ADDR)
return 0;
- ret = i2c_get_chip(bus, msg->addr, &dev);
+ ret = i2c_get_chip(bus, msg->addr, 1, &dev);
if (ret)
return ret;