summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authormario.six@gdsys.cc <mario.six@gdsys.cc>2016-06-22 13:14:16 (GMT)
committerTom Rini <trini@konsulko.com>2016-07-22 13:52:59 (GMT)
commitd7e28918aa3f4bafc15b16c546826d43fbcbe9f6 (patch)
treea010addfaa62742ea533c7e47ff6f2e9eca5185d /include
parent9f03247edc7761b608db31104821b4518a70e691 (diff)
downloadu-boot-fsl-qoriq-d7e28918aa3f4bafc15b16c546826d43fbcbe9f6.tar.xz
i2c_eeprom: Add reading support
This patch implements the reading functionality for the generic I2C EEPROM driver, which was just a non-functional stub until now. Since the page size will be of importance for the writing support, we add suitable members to the private data structure to keep track of it. Compatibility strings for a range of at24c* chips are added. Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'include')
-rw-r--r--include/i2c_eeprom.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/i2c_eeprom.h b/include/i2c_eeprom.h
index ea6c962..0452892 100644
--- a/include/i2c_eeprom.h
+++ b/include/i2c_eeprom.h
@@ -14,6 +14,10 @@ struct i2c_eeprom_ops {
};
struct i2c_eeprom {
+ /* The EEPROM's page size in byte */
+ unsigned long pagesize;
+ /* The EEPROM's page width in bits (pagesize = 2^pagewidth) */
+ unsigned pagewidth;
};
#endif