[Q] i2c_new_device vs i2c_del_driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have a question regarding dynimically created i2c devices. If I have a 
card with an i2c device on it. Once I load a driver for that card, it uses 
its knowledge of the hardware and registers a new i2c device using 
i2c_new_device. Then at some point a driver for that i2c device is loaded, 
it calls i2c_add_driver, then its probe() method is called with the 
dynamically created device. So far so good. Now I unload the i2c driver, 
it calls i2c_del_driver(), and then, IIUC, __detach_adapter will be called 
for all devices attached to this driver, including our device from above, 
then i2c_unregister_device will be called for it, a comment to which says

"reverse effect of i2c_new_device()"

So, our newly created device is gone, and loading the i2c driver again 
will not find it any more?... This doesn't seem to be the case, so, I 
think, the comment is wrong and has to be fixed.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux