Skip to contentSkip to conversation

New-style I2C driver not getting probed because of_register_i2c_devices() is not setting info.driver_name

DISCUSSION Timur Tabi 1 participant 1 message May 14, 2008

lore
Share & tools
lore

Timur Tabi

author
#0 lore raw

I'm converting sound/soc/codecs/cs4270.c into a new-style I2C driver, and this driver is not getting probed. I believe the problem is that i2c_device_match() is returning failure, because of this line:

	return strcmp(client->driver_name, drv->name) == 0;

when this line is executed, client->drivername is blank. Therefore, the strcmp never matches.

I think this string is blank because when of_register_i2c_devices() in fsl_soc.c calls i2c_register_board_info(), the info.driver_name field is also blank. i2c_new_device() copies info->driver_name to client->driver_name.

I don't understand why this code doesn't work for me. Most of the core I2C code has been in place for a year, and I can't see how my driver is different from any other new-style I2C driver that works on OF platforms.

Can anyone help me?

Signature · 2 lines
Timur Tabi
Linux kernel developer at Freescale