OSDN Git Service

memory_accessor: implement the new memory_accessor interface for I2C EEPROM
authorKevin Hilman <khilman@deeprootsystems.com>
Thu, 2 Apr 2009 23:56:57 +0000 (16:56 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 3 Apr 2009 02:04:50 +0000 (19:04 -0700)
commit7274ec8bd71e99018642f474528ea7de4bb3ae25
tree3c2e719f696292afa0717f7111d174bdfc073f27
parent06c421ee0d5af95c8c6749ca0ba620cd5010707f
memory_accessor: implement the new memory_accessor interface for I2C EEPROM

In the case of at24, the platform code registers a 'setup' callback with
the at24_platform_data.  When the at24 driver detects an EEPROM, it fills
out the read and write functions of the memory_accessor and calls the
setup callback passing the memory_accessor struct.  The platform code can
then use the read/write functions in the memory_accessor struct for
reading and writing the EEPROM.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/misc/eeprom/at24.c
include/linux/i2c/at24.h