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>
This commit is contained in:
Simon Glass
2015-01-25 08:26:55 -07:00
parent 73845350b6
commit 25ab4b0303
12 changed files with 32 additions and 26 deletions

View File

@@ -168,7 +168,7 @@ static int i2c_get_cur_bus_chip(uint chip_addr, struct udevice **devp)
if (ret)
return ret;
return i2c_get_chip(bus, chip_addr, devp);
return i2c_get_chip(bus, chip_addr, 1, devp);
}
#endif