patch-2.4.0-prerelease linux/include/linux/i2c-dev.h
Next file: linux/include/linux/i2c-id.h
Previous file: linux/include/linux/generic_serial.h
Back to the patch index
Back to the overall index
- Lines: 30
- Date:
Fri Dec 29 14:35:47 2000
- Orig file:
v2.4.0-test12/linux/include/linux/i2c-dev.h
- Orig date:
Sun Mar 19 11:15:29 2000
diff -u --recursive --new-file v2.4.0-test12/linux/include/linux/i2c-dev.h linux/include/linux/i2c-dev.h
@@ -19,7 +19,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: i2c-dev.h,v 1.7 2000/02/15 17:57:27 frodo Exp $ */
+/* $Id: i2c-dev.h,v 1.8 2000/08/12 16:37:15 mds Exp $ */
#ifndef I2C_DEV_H
#define I2C_DEV_H
@@ -160,6 +160,20 @@
data.block[0] = length;
return i2c_smbus_access(file,I2C_SMBUS_WRITE,command,
I2C_SMBUS_BLOCK_DATA, &data);
+}
+
+extern inline __s32 i2c_smbus_write_i2c_block_data(int file, __u8 command,
+ __u8 length, __u8 *values)
+{
+ union i2c_smbus_data data;
+ int i;
+ if (length > 32)
+ length = 32;
+ for (i = 1; i <= length; i++)
+ data.block[i] = values[i-1];
+ data.block[0] = length;
+ return i2c_smbus_access(file,I2C_SMBUS_WRITE,command,
+ I2C_SMBUS_I2C_BLOCK_DATA, &data);
}
#endif /* ndef __KERNEL__ */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)