diff options
author | Simon Glass <sjg@chromium.org> | 2015-05-04 11:30:58 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-05-14 18:49:33 -0600 |
commit | 01501804fdab0c80e31d1aa221d8afb79d436e52 (patch) | |
tree | c0dcfb6bb523e774fa33139e91d8c48b016e15cf /drivers/i2c | |
parent | 59aa9df383b85a7701cefbe997d242d79b452e3b (diff) | |
download | u-boot-imx-01501804fdab0c80e31d1aa221d8afb79d436e52.zip u-boot-imx-01501804fdab0c80e31d1aa221d8afb79d436e52.tar.gz u-boot-imx-01501804fdab0c80e31d1aa221d8afb79d436e52.tar.bz2 |
dm: i2c: Add a function to find out the chip offset length
We can currently set this but there is no API function to get it. Add one.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Heiko Schocher<hs@denx.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/i2c-uclass.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/i2c/i2c-uclass.c b/drivers/i2c/i2c-uclass.c index b8eb2d6..eaba965 100644 --- a/drivers/i2c/i2c-uclass.c +++ b/drivers/i2c/i2c-uclass.c @@ -415,6 +415,13 @@ int i2c_set_chip_offset_len(struct udevice *dev, uint offset_len) return 0; } +int i2c_get_chip_offset_len(struct udevice *dev) +{ + struct dm_i2c_chip *chip = dev_get_parent_platdata(dev); + + return chip->offset_len; +} + int i2c_deblock(struct udevice *bus) { struct dm_i2c_ops *ops = i2c_get_ops(bus); |