diff options
author | root <root@artemis.panaceas.org> | 2015-12-25 15:00:15 +0000 |
---|---|---|
committer | root <root@artemis.panaceas.org> | 2015-12-25 15:00:15 +0000 |
commit | ddd86436f4e3643c04b797f858dab95d5f2e4de9 (patch) | |
tree | bfe7a780cf9a2f4fc33aec32c82e625e79dece1f /backport-include/linux/i2c.h | |
download | backports-3.10.19-1-master.tar.gz backports-3.10.19-1-master.tar.bz2 backports-3.10.19-1-master.zip |
Diffstat (limited to 'backport-include/linux/i2c.h')
-rw-r--r-- | backport-include/linux/i2c.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/backport-include/linux/i2c.h b/backport-include/linux/i2c.h new file mode 100644 index 0000000..ffa9027 --- /dev/null +++ b/backport-include/linux/i2c.h @@ -0,0 +1,41 @@ +#ifndef __BACKPORT_LINUX_I2C_H +#define __BACKPORT_LINUX_I2C_H +#include_next <linux/i2c.h> +#include <linux/version.h> + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) && \ + LINUX_VERSION_CODE < KERNEL_VERSION(3,6,0) +#include <linux/i2c.h> +/* Unlocked flavor */ +#define __i2c_transfer LINUX_BACKPORT(__i2c_transfer) +extern int __i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, + int num); +#endif + +/* This backports + * + * commit 14674e70119ea01549ce593d8901a797f8a90f74 + * Author: Mark Brown <broonie@opensource.wolfsonmicro.com> + * Date: Wed May 30 10:55:34 2012 +0200 + * + * i2c: Split I2C_M_NOSTART support out of I2C_FUNC_PROTOCOL_MANGLING + */ +#ifndef I2C_FUNC_NOSTART +#define I2C_FUNC_NOSTART 0x00000010 /* I2C_M_NOSTART */ +#endif + +/* This backports: + * + * commit 7c92784a546d2945b6d6973a30f7134be78eb7a4 + * Author: Lars-Peter Clausen <lars@metafoo.de> + * Date: Wed Nov 16 10:13:36 2011 +0100 + * + * I2C: Add helper macro for i2c_driver boilerplate + */ +#ifndef module_i2c_driver +#define module_i2c_driver(__i2c_driver) \ + module_driver(__i2c_driver, i2c_add_driver, \ + i2c_del_driver) +#endif + +#endif /* __BACKPORT_LINUX_I2C_H */ |