i2c: Add support for device alias names
Based on earlier work by Jon Smirl and Jochen Friedrich. This patch allows new-style i2c chip drivers to have alias names using the official kernel aliasing system and MODULE_DEVICE_TABLE(). At this point, the old i2c driver binding scheme (driver_name/type) is still supported. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Jochen Friedrich <jochen@scram.de> Cc: Jon Smirl <jonsmirl@gmail.com> Cc: Kay Sievers <kay.sievers@vrfy.org>
This commit is contained in:
committed by
Jean Delvare
parent
ee56d97742
commit
d2653e9273
@ -368,4 +368,15 @@ struct virtio_device_id {
|
||||
};
|
||||
#define VIRTIO_DEV_ANY_ID 0xffffffff
|
||||
|
||||
/* i2c */
|
||||
|
||||
#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 */
|
||||
};
|
||||
|
||||
|
||||
#endif /* LINUX_MOD_DEVICETABLE_H */
|
||||
|
Reference in New Issue
Block a user