diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/hwmon-vid.h | 6 | ||||
-rw-r--r-- | include/linux/i2c-id.h | 20 | ||||
-rw-r--r-- | include/linux/i2c.h | 41 | ||||
-rw-r--r-- | include/linux/pci_ids.h | 1 | ||||
-rw-r--r-- | include/media/tuner.h | 7 |
5 files changed, 20 insertions, 55 deletions
diff --git a/include/linux/hwmon-vid.h b/include/linux/hwmon-vid.h index cd4b7a042b86..f346e4d5381c 100644 --- a/include/linux/hwmon-vid.h +++ b/include/linux/hwmon-vid.h | |||
@@ -23,14 +23,14 @@ | |||
23 | #ifndef _LINUX_HWMON_VID_H | 23 | #ifndef _LINUX_HWMON_VID_H |
24 | #define _LINUX_HWMON_VID_H | 24 | #define _LINUX_HWMON_VID_H |
25 | 25 | ||
26 | int vid_from_reg(int val, int vrm); | 26 | int vid_from_reg(int val, u8 vrm); |
27 | int vid_which_vrm(void); | 27 | u8 vid_which_vrm(void); |
28 | 28 | ||
29 | /* vrm is the VRM/VRD document version multiplied by 10. | 29 | /* vrm is the VRM/VRD document version multiplied by 10. |
30 | val is in mV to avoid floating point in the kernel. | 30 | val is in mV to avoid floating point in the kernel. |
31 | Returned value is the 4-, 5- or 6-bit VID code. | 31 | Returned value is the 4-, 5- or 6-bit VID code. |
32 | Note that only VRM 9.x is supported for now. */ | 32 | Note that only VRM 9.x is supported for now. */ |
33 | static inline int vid_to_reg(int val, int vrm) | 33 | static inline int vid_to_reg(int val, u8 vrm) |
34 | { | 34 | { |
35 | switch (vrm) { | 35 | switch (vrm) { |
36 | case 91: /* VRM 9.1 */ | 36 | case 91: /* VRM 9.1 */ |
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index 006c81ef4d50..fb46f8d56999 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h | |||
@@ -25,12 +25,6 @@ | |||
25 | 25 | ||
26 | /* | 26 | /* |
27 | * ---- Driver types ----------------------------------------------------- | 27 | * ---- Driver types ----------------------------------------------------- |
28 | * device id name + number function description, i2c address(es) | ||
29 | * | ||
30 | * Range 1000-1999 range is defined in sensors/sensors.h | ||
31 | * Range 0x100 - 0x1ff is for V4L2 Common Components | ||
32 | * Range 0xf000 - 0xffff is reserved for local experimentation, and should | ||
33 | * never be used in official drivers | ||
34 | */ | 28 | */ |
35 | 29 | ||
36 | #define I2C_DRIVERID_MSP3400 1 | 30 | #define I2C_DRIVERID_MSP3400 1 |
@@ -110,13 +104,7 @@ | |||
110 | #define I2C_DRIVERID_AKITAIOEXP 74 /* IO Expander on Sharp SL-C1000 */ | 104 | #define I2C_DRIVERID_AKITAIOEXP 74 /* IO Expander on Sharp SL-C1000 */ |
111 | #define I2C_DRIVERID_INFRARED 75 /* I2C InfraRed on Video boards */ | 105 | #define I2C_DRIVERID_INFRARED 75 /* I2C InfraRed on Video boards */ |
112 | 106 | ||
113 | #define I2C_DRIVERID_EXP0 0xF0 /* experimental use id's */ | ||
114 | #define I2C_DRIVERID_EXP1 0xF1 | ||
115 | #define I2C_DRIVERID_EXP2 0xF2 | ||
116 | #define I2C_DRIVERID_EXP3 0xF3 | ||
117 | |||
118 | #define I2C_DRIVERID_I2CDEV 900 | 107 | #define I2C_DRIVERID_I2CDEV 900 |
119 | #define I2C_DRIVERID_I2CPROC 901 | ||
120 | #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ | 108 | #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ |
121 | #define I2C_DRIVERID_ALERT 903 /* SMBus Alert Responder Client */ | 109 | #define I2C_DRIVERID_ALERT 903 /* SMBus Alert Responder Client */ |
122 | 110 | ||
@@ -131,15 +119,12 @@ | |||
131 | #define I2C_DRIVERID_ADM1021 1008 | 119 | #define I2C_DRIVERID_ADM1021 1008 |
132 | #define I2C_DRIVERID_ADM9240 1009 | 120 | #define I2C_DRIVERID_ADM9240 1009 |
133 | #define I2C_DRIVERID_LTC1710 1010 | 121 | #define I2C_DRIVERID_LTC1710 1010 |
134 | #define I2C_DRIVERID_SIS5595 1011 | ||
135 | #define I2C_DRIVERID_ICSPLL 1012 | 122 | #define I2C_DRIVERID_ICSPLL 1012 |
136 | #define I2C_DRIVERID_BT869 1013 | 123 | #define I2C_DRIVERID_BT869 1013 |
137 | #define I2C_DRIVERID_MAXILIFE 1014 | 124 | #define I2C_DRIVERID_MAXILIFE 1014 |
138 | #define I2C_DRIVERID_MATORB 1015 | 125 | #define I2C_DRIVERID_MATORB 1015 |
139 | #define I2C_DRIVERID_GL520 1016 | 126 | #define I2C_DRIVERID_GL520 1016 |
140 | #define I2C_DRIVERID_THMC50 1017 | 127 | #define I2C_DRIVERID_THMC50 1017 |
141 | #define I2C_DRIVERID_DDCMON 1018 | ||
142 | #define I2C_DRIVERID_VIA686A 1019 | ||
143 | #define I2C_DRIVERID_ADM1025 1020 | 128 | #define I2C_DRIVERID_ADM1025 1020 |
144 | #define I2C_DRIVERID_LM87 1021 | 129 | #define I2C_DRIVERID_LM87 1021 |
145 | #define I2C_DRIVERID_PCF8574 1022 | 130 | #define I2C_DRIVERID_PCF8574 1022 |
@@ -151,21 +136,16 @@ | |||
151 | #define I2C_DRIVERID_FSCPOS 1028 | 136 | #define I2C_DRIVERID_FSCPOS 1028 |
152 | #define I2C_DRIVERID_FSCSCY 1029 | 137 | #define I2C_DRIVERID_FSCSCY 1029 |
153 | #define I2C_DRIVERID_PCF8591 1030 | 138 | #define I2C_DRIVERID_PCF8591 1030 |
154 | #define I2C_DRIVERID_SMSC47M1 1031 | ||
155 | #define I2C_DRIVERID_VT1211 1032 | ||
156 | #define I2C_DRIVERID_LM92 1033 | 139 | #define I2C_DRIVERID_LM92 1033 |
157 | #define I2C_DRIVERID_VT8231 1034 | ||
158 | #define I2C_DRIVERID_SMARTBATT 1035 | 140 | #define I2C_DRIVERID_SMARTBATT 1035 |
159 | #define I2C_DRIVERID_BMCSENSORS 1036 | 141 | #define I2C_DRIVERID_BMCSENSORS 1036 |
160 | #define I2C_DRIVERID_FS451 1037 | 142 | #define I2C_DRIVERID_FS451 1037 |
161 | #define I2C_DRIVERID_W83627HF 1038 | ||
162 | #define I2C_DRIVERID_LM85 1039 | 143 | #define I2C_DRIVERID_LM85 1039 |
163 | #define I2C_DRIVERID_LM83 1040 | 144 | #define I2C_DRIVERID_LM83 1040 |
164 | #define I2C_DRIVERID_LM90 1042 | 145 | #define I2C_DRIVERID_LM90 1042 |
165 | #define I2C_DRIVERID_ASB100 1043 | 146 | #define I2C_DRIVERID_ASB100 1043 |
166 | #define I2C_DRIVERID_FSCHER 1046 | 147 | #define I2C_DRIVERID_FSCHER 1046 |
167 | #define I2C_DRIVERID_W83L785TS 1047 | 148 | #define I2C_DRIVERID_W83L785TS 1047 |
168 | #define I2C_DRIVERID_SMSC47B397 1050 | ||
169 | 149 | ||
170 | /* | 150 | /* |
171 | * ---- Adapter types ---------------------------------------------------- | 151 | * ---- Adapter types ---------------------------------------------------- |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 5e19a7ba69b2..7863a59bd598 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -105,14 +105,14 @@ extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client, | |||
105 | * A driver is capable of handling one or more physical devices present on | 105 | * A driver is capable of handling one or more physical devices present on |
106 | * I2C adapters. This information is used to inform the driver of adapter | 106 | * I2C adapters. This information is used to inform the driver of adapter |
107 | * events. | 107 | * events. |
108 | * | ||
109 | * The driver.owner field should be set to the module owner of this driver. | ||
110 | * The driver.name field should be set to the name of this driver. | ||
108 | */ | 111 | */ |
109 | 112 | ||
110 | struct i2c_driver { | 113 | struct i2c_driver { |
111 | struct module *owner; | ||
112 | char name[32]; | ||
113 | int id; | 114 | int id; |
114 | unsigned int class; | 115 | unsigned int class; |
115 | unsigned int flags; /* div., see below */ | ||
116 | 116 | ||
117 | /* Notifies the driver that a new bus has appeared. This routine | 117 | /* Notifies the driver that a new bus has appeared. This routine |
118 | * can be used by the driver to test if the bus meets its conditions | 118 | * can be used by the driver to test if the bus meets its conditions |
@@ -250,18 +250,7 @@ static inline void i2c_set_adapdata (struct i2c_adapter *dev, void *data) | |||
250 | dev_set_drvdata (&dev->dev, data); | 250 | dev_set_drvdata (&dev->dev, data); |
251 | } | 251 | } |
252 | 252 | ||
253 | /*flags for the driver struct: */ | ||
254 | #define I2C_DF_NOTIFY 0x01 /* notify on bus (de/a)ttaches */ | ||
255 | #if 0 | ||
256 | /* this flag is gone -- there is a (optional) driver->detach_adapter | ||
257 | * callback now which can be used instead */ | ||
258 | # define I2C_DF_DUMMY 0x02 | ||
259 | #endif | ||
260 | |||
261 | /*flags for the client struct: */ | 253 | /*flags for the client struct: */ |
262 | #define I2C_CLIENT_ALLOW_USE 0x01 /* Client allows access */ | ||
263 | #define I2C_CLIENT_ALLOW_MULTIPLE_USE 0x02 /* Allow multiple access-locks */ | ||
264 | /* on an i2c_client */ | ||
265 | #define I2C_CLIENT_PEC 0x04 /* Use Packet Error Checking */ | 254 | #define I2C_CLIENT_PEC 0x04 /* Use Packet Error Checking */ |
266 | #define I2C_CLIENT_TEN 0x10 /* we have a ten bit chip address */ | 255 | #define I2C_CLIENT_TEN 0x10 /* we have a ten bit chip address */ |
267 | /* Must equal I2C_M_TEN below */ | 256 | /* Must equal I2C_M_TEN below */ |
@@ -302,26 +291,20 @@ struct i2c_client_address_data { | |||
302 | extern int i2c_add_adapter(struct i2c_adapter *); | 291 | extern int i2c_add_adapter(struct i2c_adapter *); |
303 | extern int i2c_del_adapter(struct i2c_adapter *); | 292 | extern int i2c_del_adapter(struct i2c_adapter *); |
304 | 293 | ||
305 | extern int i2c_add_driver(struct i2c_driver *); | 294 | extern int i2c_register_driver(struct module *, struct i2c_driver *); |
306 | extern int i2c_del_driver(struct i2c_driver *); | 295 | extern int i2c_del_driver(struct i2c_driver *); |
307 | 296 | ||
297 | static inline int i2c_add_driver(struct i2c_driver *driver) | ||
298 | { | ||
299 | return i2c_register_driver(THIS_MODULE, driver); | ||
300 | } | ||
301 | |||
308 | extern int i2c_attach_client(struct i2c_client *); | 302 | extern int i2c_attach_client(struct i2c_client *); |
309 | extern int i2c_detach_client(struct i2c_client *); | 303 | extern int i2c_detach_client(struct i2c_client *); |
310 | 304 | ||
311 | /* New function: This is to get an i2c_client-struct for controlling the | 305 | /* Should be used to make sure that client-struct is valid and that it |
312 | client either by using i2c_control-function or having the | 306 | is okay to access the i2c-client. |
313 | client-module export functions that can be used with the i2c_client | 307 | returns -ENODEV if client has gone in the meantime */ |
314 | -struct. */ | ||
315 | extern struct i2c_client *i2c_get_client(int driver_id, int adapter_id, | ||
316 | struct i2c_client *prev); | ||
317 | |||
318 | /* Should be used with new function | ||
319 | extern struct i2c_client *i2c_get_client(int,int,struct i2c_client *); | ||
320 | to make sure that client-struct is valid and that it is okay to access | ||
321 | the i2c-client. | ||
322 | returns -EACCES if client doesn't allow use (default) | ||
323 | returns -EBUSY if client doesn't allow multiple use (default) and | ||
324 | usage_count >0 */ | ||
325 | extern int i2c_use_client(struct i2c_client *); | 308 | extern int i2c_use_client(struct i2c_client *); |
326 | extern int i2c_release_client(struct i2c_client *); | 309 | extern int i2c_release_client(struct i2c_client *); |
327 | 310 | ||
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 24db7248301a..a213e999de31 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -986,6 +986,7 @@ | |||
986 | #define PCI_DEVICE_ID_NVIDIA_TNT_UNKNOWN 0x002a | 986 | #define PCI_DEVICE_ID_NVIDIA_TNT_UNKNOWN 0x002a |
987 | #define PCI_DEVICE_ID_NVIDIA_VTNT2 0x002C | 987 | #define PCI_DEVICE_ID_NVIDIA_VTNT2 0x002C |
988 | #define PCI_DEVICE_ID_NVIDIA_UVTNT2 0x002D | 988 | #define PCI_DEVICE_ID_NVIDIA_UVTNT2 0x002D |
989 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SMBUS 0x0034 | ||
989 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE 0x0035 | 990 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE 0x0035 |
990 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA 0x0036 | 991 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA 0x0036 |
991 | #define PCI_DEVICE_ID_NVIDIA_NVENET_10 0x0037 | 992 | #define PCI_DEVICE_ID_NVIDIA_NVENET_10 0x0037 |
diff --git a/include/media/tuner.h b/include/media/tuner.h index faa0f8e3091b..b37cde606692 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h | |||
@@ -218,14 +218,15 @@ extern int default_tuner_init(struct i2c_client *c); | |||
218 | extern int tea5767_autodetection(struct i2c_client *c); | 218 | extern int tea5767_autodetection(struct i2c_client *c); |
219 | 219 | ||
220 | #define tuner_warn(fmt, arg...) do {\ | 220 | #define tuner_warn(fmt, arg...) do {\ |
221 | printk(KERN_WARNING "%s %d-%04x: " fmt, t->i2c.driver->name, \ | 221 | printk(KERN_WARNING "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \ |
222 | t->i2c.adapter->nr, t->i2c.addr , ##arg); } while (0) | 222 | t->i2c.adapter->nr, t->i2c.addr , ##arg); } while (0) |
223 | #define tuner_info(fmt, arg...) do {\ | 223 | #define tuner_info(fmt, arg...) do {\ |
224 | printk(KERN_INFO "%s %d-%04x: " fmt, t->i2c.driver->name, \ | 224 | printk(KERN_INFO "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \ |
225 | t->i2c.adapter->nr, t->i2c.addr , ##arg); } while (0) | 225 | t->i2c.adapter->nr, t->i2c.addr , ##arg); } while (0) |
226 | #define tuner_dbg(fmt, arg...) do {\ | 226 | #define tuner_dbg(fmt, arg...) do {\ |
227 | if (tuner_debug) \ | 227 | if (tuner_debug) \ |
228 | printk(KERN_DEBUG "%s %d-%04x: " fmt, t->i2c.driver->name, \ | 228 | printk(KERN_DEBUG "%s %d-%04x: " fmt, \ |
229 | t->i2c.driver->driver.name, \ | ||
229 | t->i2c.adapter->nr, t->i2c.addr , ##arg); } while (0) | 230 | t->i2c.adapter->nr, t->i2c.addr , ##arg); } while (0) |
230 | 231 | ||
231 | #endif /* __KERNEL__ */ | 232 | #endif /* __KERNEL__ */ |