From e9f1373b643887f63878d1169b310c9acc534cd5 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Sun, 27 Jan 2008 18:14:52 +0100 Subject: i2c: Add i2c_new_dummy() utility This adds a i2c_new_dummy() primitive to help work with devices that consume multiple addresses, which include many I2C eeproms and at least one RTC. Signed-off-by: David Brownell Signed-off-by: Jean Delvare --- include/linux/i2c.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/linux/i2c.h') diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 731928ae972c..76014f8f3c60 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -259,6 +259,12 @@ i2c_new_probed_device(struct i2c_adapter *adap, struct i2c_board_info *info, unsigned short const *addr_list); +/* For devices that use several addresses, use i2c_new_dummy() to make + * client handles for the extra addresses. + */ +extern struct i2c_client * +i2c_new_dummy(struct i2c_adapter *adap, u16 address, const char *type); + extern void i2c_unregister_device(struct i2c_client *); /* Mainboard arch_initcall() code should register all its I2C devices. -- cgit v1.2.3-59-g8ed1b