summaryrefslogtreecommitdiff
path: root/include/linux/memory.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/memory.h')
-rw-r--r--include/linux/memory.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/memory.h b/include/linux/memory.h
index 86a6c0f0518d..37fa19b34ef5 100644
--- a/include/linux/memory.h
+++ b/include/linux/memory.h
@@ -100,6 +100,17 @@ enum mem_add_context { BOOT, HOTPLUG };
#endif
/*
+ * 'struct memory_accessor' is a generic interface to provide
+ * in-kernel access to persistent memory such as i2c or SPI EEPROMs
+ */
+struct memory_accessor {
+ ssize_t (*read)(struct memory_accessor *, char *buf, off_t offset,
+ size_t count);
+ ssize_t (*write)(struct memory_accessor *, const char *buf,
+ off_t offset, size_t count);
+};
+
+/*
* Kernel text modification mutex, used for code patching. Users of this lock
* can sleep.
*/