On Fri, Feb 06, 2009 at 01:15:20PM +0100, Jean Delvare wrote: > > Taking the old, deprecated, notoriously broken i2c model as an example > doesn't necessarily serve your cause ;) I see, but till this part is in we should consider it, shouldn't we? Eheheh :D > The big difference, I presume, is that USB is never a system bus. But > even for USB, devices can't exist without the host. If you kill the > host and resurrect it later, you also kill the devices and resurrect > them later. But this can be done with i2c devices too! Let's think about leds drivers with uses an i2c GPIOs expander, they can exist without any adapter, even if they are not functional of course. :) > The debate about drivers failing device removal is an old one, not > specific to i2c. My opinion is that .remove() should succeed as much as > possible. It should really only fail if the problem is so serious that > the system's state would otherwise become a problem (e.g. freeing > memory which is still referenced.) This should be a rare case. I think that i2c clients devices should be really separated by adapter ones, that is we should be free to add and remove any adapter without considering the clients state. Then each clients device drivers should free each allocated resource they use and the adapters shouldn't know about it. Doing like this will semply the code a lot and it allows i2c core to be more flexible. Ciao, Rodolfo -- GNU/Linux Solutions e-mail: giometti@xxxxxxxxxxxx Linux Device Driver giometti@xxxxxxxx Embedded Systems phone: +39 349 2432127 UNIX programming skype: rodolfo.giometti -- 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