aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/i2c.h19
-rw-r--r--include/linux/pci_ids.h1
-rw-r--r--include/linux/serio.h1
3 files changed, 15 insertions, 6 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index cae7d618030c..2eaba21b9b1a 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -90,7 +90,7 @@ extern s32 i2c_smbus_write_block_data(struct i2c_client * client,
90 const u8 *values); 90 const u8 *values);
91/* Returns the number of read bytes */ 91/* Returns the number of read bytes */
92extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client, 92extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client,
93 u8 command, u8 *values); 93 u8 command, u8 length, u8 *values);
94extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client * client, 94extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client * client,
95 u8 command, u8 length, 95 u8 command, u8 length,
96 const u8 *values); 96 const u8 *values);
@@ -150,15 +150,20 @@ struct i2c_driver {
150 150
151/** 151/**
152 * struct i2c_client - represent an I2C slave device 152 * struct i2c_client - represent an I2C slave device
153 * @flags: I2C_CLIENT_TEN indicates the device uses a ten bit chip address;
154 * I2C_CLIENT_PEC indicates it uses SMBus Packet Error Checking
153 * @addr: Address used on the I2C bus connected to the parent adapter. 155 * @addr: Address used on the I2C bus connected to the parent adapter.
154 * @name: Indicates the type of the device, usually a chip name that's 156 * @name: Indicates the type of the device, usually a chip name that's
155 * generic enough to hide second-sourcing and compatible revisions. 157 * generic enough to hide second-sourcing and compatible revisions.
158 * @adapter: manages the bus segment hosting this I2C device
156 * @dev: Driver model device node for the slave. 159 * @dev: Driver model device node for the slave.
160 * @irq: indicates the IRQ generated by this device (if any)
157 * @driver_name: Identifies new-style driver used with this device; also 161 * @driver_name: Identifies new-style driver used with this device; also
158 * used as the module name for hotplug/coldplug modprobe support. 162 * used as the module name for hotplug/coldplug modprobe support.
159 * 163 *
160 * An i2c_client identifies a single device (i.e. chip) connected to an 164 * An i2c_client identifies a single device (i.e. chip) connected to an
161 * i2c bus. The behaviour is defined by the routines of the driver. 165 * i2c bus. The behaviour exposed to Linux is defined by the driver
166 * managing the device.
162 */ 167 */
163struct i2c_client { 168struct i2c_client {
164 unsigned short flags; /* div., see below */ 169 unsigned short flags; /* div., see below */
@@ -180,7 +185,8 @@ struct i2c_client {
180 185
181static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj) 186static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj)
182{ 187{
183 return to_i2c_client(container_of(kobj, struct device, kobj)); 188 struct device * const dev = container_of(kobj, struct device, kobj);
189 return to_i2c_client(dev);
184} 190}
185 191
186static inline void *i2c_get_clientdata (struct i2c_client *dev) 192static inline void *i2c_get_clientdata (struct i2c_client *dev)
@@ -201,7 +207,7 @@ static inline void i2c_set_clientdata (struct i2c_client *dev, void *data)
201 * @addr: stored in i2c_client.addr 207 * @addr: stored in i2c_client.addr
202 * @platform_data: stored in i2c_client.dev.platform_data 208 * @platform_data: stored in i2c_client.dev.platform_data
203 * @irq: stored in i2c_client.irq 209 * @irq: stored in i2c_client.irq
204 210 *
205 * I2C doesn't actually support hardware probing, although controllers and 211 * I2C doesn't actually support hardware probing, although controllers and
206 * devices may be able to use I2C_SMBUS_QUICK to tell whether or not there's 212 * devices may be able to use I2C_SMBUS_QUICK to tell whether or not there's
207 * a device at a given address. Drivers commonly need more information than 213 * a device at a given address. Drivers commonly need more information than
@@ -210,7 +216,7 @@ static inline void i2c_set_clientdata (struct i2c_client *dev, void *data)
210 * i2c_board_info is used to build tables of information listing I2C devices 216 * i2c_board_info is used to build tables of information listing I2C devices
211 * that are present. This information is used to grow the driver model tree 217 * that are present. This information is used to grow the driver model tree
212 * for "new style" I2C drivers. For mainboards this is done statically using 218 * for "new style" I2C drivers. For mainboards this is done statically using
213 * i2c_register_board_info(), where @bus_num represents an adapter that isn't 219 * i2c_register_board_info(); bus numbers identify adapters that aren't
214 * yet available. For add-on boards, i2c_new_device() does this dynamically 220 * yet available. For add-on boards, i2c_new_device() does this dynamically
215 * with the adapter already known. 221 * with the adapter already known.
216 */ 222 */
@@ -518,8 +524,9 @@ union i2c_smbus_data {
518#define I2C_SMBUS_WORD_DATA 3 524#define I2C_SMBUS_WORD_DATA 3
519#define I2C_SMBUS_PROC_CALL 4 525#define I2C_SMBUS_PROC_CALL 4
520#define I2C_SMBUS_BLOCK_DATA 5 526#define I2C_SMBUS_BLOCK_DATA 5
521#define I2C_SMBUS_I2C_BLOCK_DATA 6 527#define I2C_SMBUS_I2C_BLOCK_BROKEN 6
522#define I2C_SMBUS_BLOCK_PROC_CALL 7 /* SMBus 2.0 */ 528#define I2C_SMBUS_BLOCK_PROC_CALL 7 /* SMBus 2.0 */
529#define I2C_SMBUS_I2C_BLOCK_DATA 8
523 530
524 531
525/* ----- commands for the ioctl like i2c_command call: 532/* ----- commands for the ioctl like i2c_command call:
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 75c4d4d06892..8300001e9078 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -371,6 +371,7 @@
371#define PCI_DEVICE_ID_ATI_IXP600_SMBUS 0x4385 371#define PCI_DEVICE_ID_ATI_IXP600_SMBUS 0x4385
372#define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c 372#define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c
373#define PCI_DEVICE_ID_ATI_IXP700_SATA 0x4390 373#define PCI_DEVICE_ID_ATI_IXP700_SATA 0x4390
374#define PCI_DEVICE_ID_ATI_IXP700_SMBUS 0x4395
374#define PCI_DEVICE_ID_ATI_IXP700_IDE 0x439c 375#define PCI_DEVICE_ID_ATI_IXP700_IDE 0x439c
375 376
376#define PCI_VENDOR_ID_VLSI 0x1004 377#define PCI_VENDOR_ID_VLSI 0x1004
diff --git a/include/linux/serio.h b/include/linux/serio.h
index 1ebf0455e224..d9377ce9ffd1 100644
--- a/include/linux/serio.h
+++ b/include/linux/serio.h
@@ -209,5 +209,6 @@ static inline void serio_unpin_driver(struct serio *serio)
209#define SERIO_PENMOUNT 0x31 209#define SERIO_PENMOUNT 0x31
210#define SERIO_TOUCHRIGHT 0x32 210#define SERIO_TOUCHRIGHT 0x32
211#define SERIO_TOUCHWIN 0x33 211#define SERIO_TOUCHWIN 0x33
212#define SERIO_TAOSEVM 0x34
212 213
213#endif 214#endif