[i2c] "driver forgot to specify physical device"

Jean Delvare khali at linux-fr.org
Mon Apr 16 14:48:32 CEST 2007


Hi Till,

On Sat, 14 Apr 2007 19:38:21 +0200, Till Harbaum / Lists wrote:
> i just updated to ubuntu feisty and thus to 2.6.20. My i2c-tiny-usb now
> provoces the following warning:
> 
> **WARNING** I2C adapter driver [i2c-tiny-usb at bus 006 device 002] forgot to 
> specify physical device; fix it!
> 
> I didn't really have a reference driver to base my own on, since my driver 
> basically forwards the messages sent by the i2c core to my hardware and
> is not interpreting the commands itself like all those other hardware drivers
> do. Furthermore there's no such thing as a "algo" involved. 
> 
> I don't really have a clue how this is to be solved correctly. I don't rely
> on a physical driver or the like, so where and how do i have to provide
> the physical device info? Please see the attached driver source if you think
> you want to have a look at it.

Easy, in the i2c_tiny_usb_probe(), before you call i2c_add_adapter(),
add:

	dev->i2c_adap.dev.parent = &dev->dev;

That should do it. The nice benefit is that your i2c adapter will then show
in the right place in /sys.

> I am willing to donate one of these devices 
> (http://www.harbaum.org/till/i2c_tiny_usb) to anyone willing to fix these
> things and get the driver into the official kernel sources. 

You will have to make it comply with Documentation/CodingStyle first.

-- 
Jean Delvare



More information about the i2c mailing list