Changeset 13 for lm-sensors/trunk/kernel/include/smbus.h
- Timestamp:
- 11/26/98 11:16:08 (14 years ago)
- Files:
-
- 1 modified
-
lm-sensors/trunk/kernel/include/smbus.h (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/kernel/include/smbus.h
r12 r13 131 131 #define i2c_is_smbus_client(clientptr) \ 132 132 ((clientptr)->adapter->algo->id == ALGO_SMBUS) 133 #define i2c_is_smbus_adapter(adapptr) \ 134 ((adapptr)->algo->id == ALGO_SMBUS) 133 135 134 136 /* This union is used within smbus_access routines */ … … 158 160 /* This is the very generalized SMBus access routine. You probably do not 159 161 want to use this, though; one of the functions below may be much easier, 160 and probably just as fast. */ 161 extern s32 smbus_access (struct smbus_adapter * adapter, u8 addr, 162 and probably just as fast. 163 Note that we use i2c_adapter here, because you do not need a specific 164 smbus adapter to call this function. */ 165 extern s32 smbus_access (struct i2c_adapter * adapter, u8 addr, 162 166 char read_write, u8 command, int size, 163 167 union smbus_data * data); … … 166 170 conventions of smbus_access. */ 167 171 168 extern inline s32 smbus_write_quick(struct smbus_adapter * adapter, u8 addr,172 extern inline s32 smbus_write_quick(struct i2c_adapter * adapter, u8 addr, 169 173 u8 value) 170 174 { … … 172 176 } 173 177 174 extern inline s32 smbus_read_byte(struct smbus_adapter * adapter,u8 addr)178 extern inline s32 smbus_read_byte(struct i2c_adapter * adapter,u8 addr) 175 179 { 176 180 union smbus_data data; … … 181 185 } 182 186 183 extern inline s32 smbus_write_byte(struct smbus_adapter * adapter, u8 addr,187 extern inline s32 smbus_write_byte(struct i2c_adapter * adapter, u8 addr, 184 188 u8 value) 185 189 { … … 187 191 } 188 192 189 extern inline s32 smbus_read_byte_data(struct smbus_adapter * adapter,193 extern inline s32 smbus_read_byte_data(struct i2c_adapter * adapter, 190 194 u8 addr, u8 command) 191 195 { … … 197 201 } 198 202 199 extern inline s32 smbus_write_byte_data(struct smbus_adapter * adapter,203 extern inline s32 smbus_write_byte_data(struct i2c_adapter * adapter, 200 204 u8 addr, u8 command, u8 value) 201 205 { … … 205 209 } 206 210 207 extern inline s32 smbus_read_word_data(struct smbus_adapter * adapter,211 extern inline s32 smbus_read_word_data(struct i2c_adapter * adapter, 208 212 u8 addr, u8 command) 209 213 { … … 215 219 } 216 220 217 extern inline s32 smbus_write_word_data(struct smbus_adapter * adapter,221 extern inline s32 smbus_write_word_data(struct i2c_adapter * adapter, 218 222 u8 addr, u8 command, u16 value) 219 223 { … … 223 227 } 224 228 225 extern inline s32 smbus_process_call(struct smbus_adapter * adapter,229 extern inline s32 smbus_process_call(struct i2c_adapter * adapter, 226 230 u8 addr, u8 command, u16 value) 227 231 { … … 235 239 236 240 /* Returns the number of read bytes */ 237 extern inline s32 smbus_read_block_data(struct smbus_adapter * adapter,241 extern inline s32 smbus_read_block_data(struct i2c_adapter * adapter, 238 242 u8 addr, u8 command, u8 *values) 239 243 { … … 249 253 } 250 254 251 extern inline int smbus_write_block_data(struct smbus_adapter * adapter,255 extern inline int smbus_write_block_data(struct i2c_adapter * adapter, 252 256 u8 addr, u8 command, u8 length, 253 257 u8 *values)
