i2c: slave-eeprom: add eeprom simulator driver
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Tue, 18 Nov 2014 16:04:54 +0000 (17:04 +0100)
committerWolfram Sang <wsa@the-dreams.de>
Thu, 11 Dec 2014 21:25:54 +0000 (22:25 +0100)
The first user of the i2c-slave interface is an eeprom simulator. It is
a shared memory which can be accessed by the remote master via I2C and
locally via sysfs.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/Kconfig
drivers/i2c/Makefile
drivers/i2c/i2c-slave-eeprom.c [new file with mode: 0644]

index b51a402..8c9e619 100644 (file)
@@ -110,6 +110,16 @@ config I2C_STUB
 
          If you don't know what to do here, definitely say N.
 
+config I2C_SLAVE
+       bool "I2C slave support"
+
+if I2C_SLAVE
+
+config I2C_SLAVE_EEPROM
+       tristate "I2C eeprom slave driver"
+
+endif
+
 config I2C_DEBUG_CORE
        bool "I2C Core debugging messages"
        help
index 1722f50..45095b3 100644 (file)
@@ -9,6 +9,7 @@ obj-$(CONFIG_I2C_CHARDEV)       += i2c-dev.o
 obj-$(CONFIG_I2C_MUX)          += i2c-mux.o
 obj-y                          += algos/ busses/ muxes/
 obj-$(CONFIG_I2C_STUB)         += i2c-stub.o
+obj-$(CONFIG_I2C_SLAVE_EEPROM) += i2c-slave-eeprom.o
 
 ccflags-$(CONFIG_I2C_DEBUG_CORE) := -DDEBUG
 CFLAGS_i2c-core.o := -Wno-deprecated-declarations
Simple merge