[i2c] [patch 2.6.19-rc6 0/11] I2C driver model updates

Jean Delvare khali at linux-fr.org
Fri Dec 15 17:51:46 CET 2006


Hi David,

On Sat, 25 Nov 2006 13:40:41 -0800, David Brownell wrote:
> Here's a refresh of some previous patches, updated per feedback, and
> headed by some new core cleanups.
> 
> The first few should IMO be candidates for 2.6.20-early:
> 
>  - Core cleanup:  remove i2c_adapter.dev and non-class "i2c-adapter" class
>  - i2-isa updates, it (needlessly) relied on those interfaces
>  - I2C adapter updates, use i2c_adapter.class_dev.dev not &i2c_adapter.dev
>  - I2C misc updates, non-adapter drivers need the same changes.

There's an organizational problem in this series. Each patch must
constitute an incremental update where everything still compiles and
works afterwards. Here you start by deleting i2c_adapter.dev, and the
subsequent patches remove its users. That's the wrong way around, you
must remove the users first, and only then you can remove
i2c_adapter.dev.

So basically your patch #1 should come after all the "don't use
i2c_adapter.dev" patches. But then there's another problem in patch #3:
this patch doesn't only remove users of i2c_adapter.dev, it also
changes the way adapters declare their parent device. This family of
changes really belongs to the i2c-core patch (#1), as one cannot go
without the other.

So, please rework this first patchset into something that I can apply
incrementally. The other patches we should discuss later, this first
change is large enough by itself.

>  - Add suspend()/resume()/shutdown() methods; document them
> 
> Any drivers that missed catching up to that core cleanup will generate
> nice clean compile-time errors.  Stuff in drivers/i2c that compiles for
> ARM or x86 PCs should behave already.
> 
> The others add the "new style" driver binding, and might need a bit more
> cooking yet ... though IMO merging soon would be good, since that's needed
> to start converting drivers (and by definition this can't affect "legacy"
> drivers):
> 
>  - Add probe() method and associated hotplug/coldplug support
>  - Add remove() method
>  - Doc updates to match those new methods
>  - Add and use i2c_board_info infrastructure, for "new style" drivers
>  - i2c-omap update, uses new i2c_register_adapter()
>  - Convert one board (OMAP5912 OSK) to use the new style drivers
> 
> There are of course other patches that should follow, including a few
> more i2c core cleanups and updates to make various boards and drivers
> use this new infrastructure, but this is enough to get the ball rolling.
> 
> Once it's rolling, serious discussions about how to convert legacy drivers
> to be more compatible with the driver model can usefully proceed.  I expect
> such discussions will take quite a while to sort out.

Thanks,
-- 
Jean Delvare



More information about the i2c mailing list