aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/i2c-id.h3
-rw-r--r--include/linux/i2c.h17
-rw-r--r--include/linux/mod_devicetable.h11
3 files changed, 19 insertions, 12 deletions
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h
index 32eb8bbe4831..580acc93903e 100644
--- a/include/linux/i2c-id.h
+++ b/include/linux/i2c-id.h
@@ -79,12 +79,9 @@
79#define I2C_DRIVERID_UPD64031A 79 /* upd64031a video processor */ 79#define I2C_DRIVERID_UPD64031A 79 /* upd64031a video processor */
80#define I2C_DRIVERID_SAA717X 80 /* saa717x video encoder */ 80#define I2C_DRIVERID_SAA717X 80 /* saa717x video encoder */
81#define I2C_DRIVERID_DS1672 81 /* Dallas/Maxim DS1672 RTC */ 81#define I2C_DRIVERID_DS1672 81 /* Dallas/Maxim DS1672 RTC */
82#define I2C_DRIVERID_X1205 82 /* Xicor/Intersil X1205 RTC */
83#define I2C_DRIVERID_PCF8563 83 /* Philips PCF8563 RTC */
84#define I2C_DRIVERID_BT866 85 /* Conexant bt866 video encoder */ 82#define I2C_DRIVERID_BT866 85 /* Conexant bt866 video encoder */
85#define I2C_DRIVERID_KS0127 86 /* Samsung ks0127 video decoder */ 83#define I2C_DRIVERID_KS0127 86 /* Samsung ks0127 video decoder */
86#define I2C_DRIVERID_TLV320AIC23B 87 /* TI TLV320AIC23B audio codec */ 84#define I2C_DRIVERID_TLV320AIC23B 87 /* TI TLV320AIC23B audio codec */
87#define I2C_DRIVERID_ISL1208 88 /* Intersil ISL1208 RTC */
88#define I2C_DRIVERID_WM8731 89 /* Wolfson WM8731 audio codec */ 85#define I2C_DRIVERID_WM8731 89 /* Wolfson WM8731 audio codec */
89#define I2C_DRIVERID_WM8750 90 /* Wolfson WM8750 audio codec */ 86#define I2C_DRIVERID_WM8750 90 /* Wolfson WM8750 audio codec */
90#define I2C_DRIVERID_WM8753 91 /* Wolfson WM8753 audio codec */ 87#define I2C_DRIVERID_WM8753 91 /* Wolfson WM8753 audio codec */
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 365e0df3646b..cb63da5c2139 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -126,7 +126,7 @@ struct i2c_driver {
126 * With the driver model, device enumeration is NEVER done by drivers; 126 * With the driver model, device enumeration is NEVER done by drivers;
127 * it's done by infrastructure. (NEW STYLE DRIVERS ONLY) 127 * it's done by infrastructure. (NEW STYLE DRIVERS ONLY)
128 */ 128 */
129 int (*probe)(struct i2c_client *); 129 int (*probe)(struct i2c_client *, const struct i2c_device_id *);
130 int (*remove)(struct i2c_client *); 130 int (*remove)(struct i2c_client *);
131 131
132 /* driver model interfaces that don't relate to enumeration */ 132 /* driver model interfaces that don't relate to enumeration */
@@ -140,11 +140,10 @@ struct i2c_driver {
140 int (*command)(struct i2c_client *client,unsigned int cmd, void *arg); 140 int (*command)(struct i2c_client *client,unsigned int cmd, void *arg);
141 141
142 struct device_driver driver; 142 struct device_driver driver;
143 const struct i2c_device_id *id_table;
143}; 144};
144#define to_i2c_driver(d) container_of(d, struct i2c_driver, driver) 145#define to_i2c_driver(d) container_of(d, struct i2c_driver, driver)
145 146
146#define I2C_NAME_SIZE 20
147
148/** 147/**
149 * struct i2c_client - represent an I2C slave device 148 * struct i2c_client - represent an I2C slave device
150 * @flags: I2C_CLIENT_TEN indicates the device uses a ten bit chip address; 149 * @flags: I2C_CLIENT_TEN indicates the device uses a ten bit chip address;
@@ -230,17 +229,17 @@ struct i2c_board_info {
230}; 229};
231 230
232/** 231/**
233 * I2C_BOARD_INFO - macro used to list an i2c device and its driver 232 * I2C_BOARD_INFO - macro used to list an i2c device and its address
234 * @driver: identifies the driver to use with the device 233 * @dev_type: identifies the device type
235 * @dev_addr: the device's address on the bus. 234 * @dev_addr: the device's address on the bus.
236 * 235 *
237 * This macro initializes essential fields of a struct i2c_board_info, 236 * This macro initializes essential fields of a struct i2c_board_info,
238 * declaring what has been provided on a particular board. Optional 237 * declaring what has been provided on a particular board. Optional
239 * fields (such as the chip type, its associated irq, or device-specific 238 * fields (such as associated irq, or device-specific platform_data)
240 * platform_data) are provided using conventional syntax. 239 * are provided using conventional syntax.
241 */ 240 */
242#define I2C_BOARD_INFO(driver,dev_addr) \ 241#define I2C_BOARD_INFO(dev_type,dev_addr) \
243 .driver_name = (driver), .addr = (dev_addr) 242 .type = (dev_type), .addr = (dev_addr)
244 243
245 244
246/* Add-on boards should register/unregister their devices; e.g. a board 245/* Add-on boards should register/unregister their devices; e.g. a board
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index 139d49d2f078..d73eceaa7afb 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -368,4 +368,15 @@ struct virtio_device_id {
368}; 368};
369#define VIRTIO_DEV_ANY_ID 0xffffffff 369#define VIRTIO_DEV_ANY_ID 0xffffffff
370 370
371/* i2c */
372
373#define I2C_NAME_SIZE 20
374#define I2C_MODULE_PREFIX "i2c:"
375
376struct i2c_device_id {
377 char name[I2C_NAME_SIZE];
378 kernel_ulong_t driver_data; /* Data private to the driver */
379};
380
381
371#endif /* LINUX_MOD_DEVICETABLE_H */ 382#endif /* LINUX_MOD_DEVICETABLE_H */