i2c: expand I2C's id.name to 23 characters
PATCH 1/2 i2c: expand I2C's id.name to 23 characters
It was discussed[1] that we should match on the first (most specific) entry in the device tree.
The most lengthy I2C compatible entry for the MPC8349E-mITX MCU devices is "mc9s08qg8-mpc8349emitx" (w/o vendor name). This means that we have to allow longer IDs to be used in the I2C subsystem.
[1] http://www.mail-archive.com/[email protected]/msg21196.html
--- include/linux/mod_devicetable.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/linux/mod_devicetable.h +1 -1
@@ -379,7 +379,7 @@ struct virtio_device_id {/* i2c */ -#define I2C_NAME_SIZE 20 +#define I2C_NAME_SIZE 23#define I2C_MODULE_PREFIX "i2c:"struct i2c_device_id {
Signature · 1 line
1.5.6.3
A message that is not in the archive (sent off-list or not yet received): 20080919180339.GA13899-wnGakbxT3iijyJ0x5qLZdcN33GVbZNy3@public.gmane.org
Quoted 8 lines · Anton Vorontsov
It was discussed[1] that we should match on the first (most specific) entry in the device tree.
The most lengthy I2C compatible entry for the MPC8349E-mITX MCU devices is "mc9s08qg8-mpc8349emitx" (w/o vendor name). This means that we have to allow longer IDs to be used in the I2C subsystem.
[1] http://www.mail-archive.com/[email protected]/msg21196.html
Nack. Just come up with shorter names. "mc9s08qg8-mpc8349emitx" is simply too long to start with. Looking at the mcu_mpc8349emitx driver you just submitted, you are clearly abusing the i2c client name to pass platform-specific information, and that's bad. I'm not even sure why you do that, given that all the names are then handled the same as far as I can see.
Quoted 19 lines
Signed-off-by Anton Vorontsov <[email protected]>--- include/linux/mod_devicetable.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)include/linux/mod_devicetable.h +1
-1@@ -379,7 +379,7 @@ struct virtio_device_id {/* i2c */ -#define I2C_NAME_SIZE 20 +#define I2C_NAME_SIZE 23#define I2C_MODULE_PREFIX "i2c:"struct i2c_device_id {
Signature · 6 lines
Jean Delvare _______________________________________________ i2c mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/i2c
Quoted 8 lines · Jean Delvare
Quoted 7 lines · Anton Vorontsov
It was discussed[1] that we should match on the first (most specific) entry in the device tree.
The most lengthy I2C compatible entry for the MPC8349E-mITX MCU devices is "mc9s08qg8-mpc8349emitx" (w/o vendor name). This means that we have to allow longer IDs to be used in the I2C subsystem.
Quoted 8 lines
Quoted 1 line
[1] http://www.mail-archive.com/[email protected]/msg21196.html
Nack. Just come up with shorter names. "mc9s08qg8-mpc8349emitx" is simply too long to start with. Looking at the
mcu_mpc8349emitxdriver you just submitted, you are clearly abusing the i2c client name to pass platform-specific information, and that's bad. I'm not even sure why you do that, given that all the names are then handled the same as far as I can see.
The whole "matching on the first entry" thing is just a Linux-internal heuristic. If the heuristic breaks down (like it does here), then there is a mechanism to override it in of_base.c which has a compatible-->modalias translation table.
g.