Re: [PATCH, RFC] Earlier I2C initialization

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Brownell
Date: Thursday, June 12, 2008 - 12:57 pm

On Thursday 12 June 2008, Jean Delvare wrote:


... and *BEFORE* the "i2c_client" driver.  Moving I2C earlier in the
link order may be necessary to ensure that.

Yes, (b2) is essentially the "30,000 foot view" of the problem for
which (b1) is the lower altitude "5,000 foot view".  The PCI version
of that problem has the relevant init code running at arch_initcall
level (in at least those MIPS cases) and also getting linked before
all the code in the "drivers" subtree.



No; that would be a case of moving other subsystems *AFTER* I2C in
the link order, not moving any i2c_client driver earlier.

Remember, you were wanting (appropriately!) to move drivers out of
the i2c subtree when they have a better home.  And in this case,
(b2) explains why that surfaces this requirement for earlier init
of I2C ... if those drivers were in drivers/i2c/chips, the link order
would not be an issue.



Missing my point:  since those i2c_adapter drivers aren't getting
used early (subsys_initcall etc), this issue *can't* come up with them.
Whether or not those subsystems "play well with others".  This issue
is *only* for drivers outside the i2c subtree which are essential for
system bringup, at the subsys_initcall level.



I see a bunch of module_init(), which means device_initcall(),
which means well after subsys_initcall().  So i2c-parport should
behave.



Well, it's a legacy driver so automatically has that class of problems
(making its own device node etc) ... but those issues are unrelated to
the $SUBJECT issue.



Always.  :)



We have reason to do both.  That's why I called out cases (a) vs (b)
(and b1/b2) above.  They address different problems.

This is confusing stuff, in part because this part of initialization
is all driven by side effects and is thus normally hidden.

The arch_initcall/subsys_initcall/device_initcall/... stuff (a) is at
least partially explicit.  But the sequencing of initcalls within a
given grouping (b) is purely a link order side effect.

So every time changing the link order comes up, confusion arises.

- Dave

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH, RFC] Earlier I2C initialization, Ryan Mallon, (Mon Jun 9, 2:27 pm)
Re: [PATCH, RFC] Earlier I2C initialization, Jean Delvare, (Mon Jun 9, 11:57 pm)
Re: [PATCH, RFC] Earlier I2C initialization, Uli Luckas, (Tue Jun 10, 2:46 am)
Re: [PATCH, RFC] Earlier I2C initialization, David Brownell, (Tue Jun 10, 1:55 pm)
Re: [PATCH, RFC] Earlier I2C initialization, Ryan Mallon, (Tue Jun 10, 2:33 pm)
Re: [PATCH, RFC] Earlier I2C initialization, Ryan Mallon, (Tue Jun 10, 8:12 pm)
Re: [PATCH, RFC] Earlier I2C initialization, Jean Delvare, (Wed Jun 11, 12:40 am)
Re: [PATCH, RFC] Earlier I2C initialization, Jean Delvare, (Wed Jun 11, 1:11 am)
Re: [PATCH, RFC] Earlier I2C initialization, Russell King - ARM Linux, (Wed Jun 11, 2:00 am)
Re: [PATCH, RFC] Earlier I2C initialization, Jean Delvare, (Wed Jun 11, 2:14 am)
Re: [PATCH, RFC] Earlier I2C initialization, Jean Delvare, (Wed Jun 11, 5:05 am)
Re: [PATCH, RFC] Earlier I2C initialization, Jean Delvare, (Wed Jun 11, 5:18 am)
Re: [PATCH, RFC] Earlier I2C initialization, David Brownell, (Wed Jun 11, 11:31 am)
Re: [PATCH, RFC] Earlier I2C initialization, Ryan Mallon, (Wed Jun 11, 1:13 pm)
Re: [PATCH, RFC] Earlier I2C initialization, Ryan Mallon, (Wed Jun 11, 1:23 pm)
Re: [PATCH, RFC] Earlier I2C initialization, David Brownell, (Wed Jun 11, 1:27 pm)
Re: [PATCH, RFC] Earlier I2C initialization, Jean Delvare, (Wed Jun 11, 1:54 pm)
Re: [PATCH, RFC] Earlier I2C initialization, Ryan Mallon, (Wed Jun 11, 2:24 pm)
Re: [PATCH, RFC] Earlier I2C initialization, Maciej W. Rozycki, (Wed Jun 11, 2:31 pm)
Re: [PATCH, RFC] Earlier I2C initialization, Jean Delvare, (Thu Jun 12, 11:44 am)
Re: [PATCH, RFC] Earlier I2C initialization, David Brownell, (Thu Jun 12, 12:57 pm)
Re: [PATCH, RFC] Earlier I2C initialization, David Brownell, (Thu Jun 12, 1:21 pm)
Re: [PATCH, RFC] Earlier I2C initialization, Jean Delvare, (Tue Jun 24, 9:39 am)
Re: [PATCH, RFC] Earlier I2C initialization, Jean Delvare, (Tue Jun 24, 10:06 am)
Re: [PATCH, RFC] Earlier I2C initialization, Ryan Mallon, (Thu Jun 26, 2:12 pm)
Re: [PATCH, RFC] Earlier I2C initialization, Jean Delvare, (Fri Jun 27, 3:41 am)
Re: [PATCH, RFC] Earlier I2C initialization, Ryan Mallon, (Sun Jun 29, 1:34 pm)