summaryrefslogtreecommitdiff
path: root/include/i2c.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-05-04 11:30:58 -0600
committerSimon Glass <sjg@chromium.org>2015-05-14 18:49:33 -0600
commit01501804fdab0c80e31d1aa221d8afb79d436e52 (patch)
treec0dcfb6bb523e774fa33139e91d8c48b016e15cf /include/i2c.h
parent59aa9df383b85a7701cefbe997d242d79b452e3b (diff)
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 'include/i2c.h')
-rw-r--r--include/i2c.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/i2c.h b/include/i2c.h
index 1e259861b78..ddfebc4107f 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -193,8 +193,15 @@ int i2c_get_chip_flags(struct udevice *dev, uint *flagsp);
*
* @offset_len: New offset length value (typically 1 or 2)
*/
-
int i2c_set_chip_offset_len(struct udevice *dev, uint offset_len);
+
+/**
+ * i2c_get_offset_len() - get the offset length for a chip
+ *
+ * @return: Current offset length value (typically 1 or 2)
+ */
+int i2c_get_chip_offset_len(struct udevice *dev);
+
/**
* i2c_deblock() - recover a bus that is in an unknown state
*