[U-Boot-Users] [Patch 1/9]U-boot-V2:ID: Add i2c_device_id
Menon, Nishanth
x0nishan at ti.com
Thu Jun 19 17:11:10 CEST 2008
Introduce device_id for I2C. This will allow for
clients to register at a later stage with
multiple IDs. Currently introduced for i2c-dev's
generic client support
Signed-off-by: Nishanth Menon <x0nishan at ti.com>
---
include/linux/mod_devicetable.h | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
Index: u-boot-v2.git/include/linux/mod_devicetable.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ u-boot-v2.git/include/linux/mod_devicetable.h 2008-06-19 08:39:34.000000000 -0500
@@ -0,0 +1,25 @@
+/*
+ * Device tables which are exported via
+ * scripts/mod/file2alias.c. You must keep that file in sync with this
+ * header.
+ */
+
+#ifndef LINUX_MOD_DEVICETABLE_H
+#define LINUX_MOD_DEVICETABLE_H
+
+#ifdef __U_BOOT__
+#include <linux/types.h>
+typedef unsigned long kernel_ulong_t;
+#endif
+
+#define I2C_NAME_SIZE 20
+#define I2C_MODULE_PREFIX "i2c:"
+
+struct i2c_device_id {
+ char name[I2C_NAME_SIZE];
+ kernel_ulong_t driver_data /* Data private to the driver */
+ __attribute__((aligned(sizeof(kernel_ulong_t))));
+};
+
+
+#endif /* LINUX_MOD_DEVICETABLE_H */
More information about the U-Boot
mailing list