summaryrefslogtreecommitdiff
path: root/include/linux/platform_data
diff options
context:
space:
mode:
authorSven Van Asbroeck <svendev@arcx.com>2017-12-08 11:28:30 -0500
committerBartosz Golaszewski <brgl@bgdev.pl>2018-01-01 19:40:48 +0100
commite32213fbc5432c28268dced0dc8735dcf8532d36 (patch)
treea5b25dc3be738432c982d5013f7335c533e7ab6f /include/linux/platform_data
parent355dd4ca10b49183272ec54ed9853bb4b95d2391 (diff)
eeprom: at24: support eeproms that do not auto-rollover reads
Some multi-address eeproms in the at24 family may not automatically roll-over reads to the next slave address. On those eeproms, reads that straddle slave boundaries will not work correctly. Solution: Mark such eeproms with a flag that prevents reads straddling slave boundaries. Add the AT24_FLAG_NO_RDROL flag to the eeprom entry in the device_id table, or add 'no-read-rollover' to the eeprom devicetree entry. Note that I have not personally enountered an at24 chip that does not support read rollovers. They may or may not exist. However, my hardware requires this functionality because of a quirk. Signed-off-by: Sven Van Asbroeck <svendev@arcx.com> Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Diffstat (limited to 'include/linux/platform_data')
-rw-r--r--include/linux/platform_data/at24.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/platform_data/at24.h b/include/linux/platform_data/at24.h
index 271a4e25af67..841bb2815a41 100644
--- a/include/linux/platform_data/at24.h
+++ b/include/linux/platform_data/at24.h
@@ -50,6 +50,8 @@ struct at24_platform_data {
#define AT24_FLAG_TAKE8ADDR BIT(4) /* take always 8 addresses (24c00) */
#define AT24_FLAG_SERIAL BIT(3) /* factory-programmed serial number */
#define AT24_FLAG_MAC BIT(2) /* factory-programmed mac address */
+#define AT24_FLAG_NO_RDROL BIT(1) /* does not auto-rollover reads to */
+ /* the next slave address */
void (*setup)(struct nvmem_device *nvmem, void *context);
void *context;