Re: device/driver binding notification

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Kay Sievers <kay.sievers@...>
Cc: Greg Kroah-Hartman <gregkh@...>, Hans Verkuil <hverkuil@...>, LKML <linux-kernel@...>
Date: Monday, July 7, 2008 - 9:06 am

Hi Kay,

Thanks for your quick reply.

On Mon, 07 Jul 2008 14:41:31 +0200, Kay Sievers wrote:

Looks really good :) Thanks for the pointer. I'll get back to you if
it doesn't work for me, but apparently it should.


They do eventually take a reference to the i2c device, but that's not
really the point. They control the life cycle of the device anyway, so
it's not going away. What the v4l drivers want to protect themselves
against, is said i2c device being unbound from its driver, because they
just can't work properly if they can't delegate a part of the work to
the i2c drivers.

My hope was that we could take a reference to the modules that provide
the drivers in question at the time they bind, so that they simply
can't be removed until we say it's safe, but I guess it wouldn't
protect us against manual unbind from sysfs. Unless there is a way to
block manual unbind, too?

In theory I guess that the v4l drivers should expect the i2c device to
be unbound and they should put themselves on hold when this happens,
until the devices are bound again, at which point they would need to
resync or reinitialize everything. However in practice this seems to
add a lot of complexity to the drivers, to handle a case which should
never happen in practice, so I'm reluctant to go that way.

Thanks,
-- 
Jean Delvare
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
device/driver binding notification, Jean Delvare, (Sat Jul 5, 2:54 pm)
Re: device/driver binding notification, Kay Sievers, (Mon Jul 7, 8:41 am)
Re: device/driver binding notification, Jean Delvare, (Mon Jul 7, 9:06 am)