Re: [PATCH, RFC] Earlier I2C initialization

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jean Delvare <khali@...>
Cc: David Brownell <david-b@...>, Uli Luckas <u.luckas@...>, Russell King - ARM Linux <linux@...>, <i2c@...>, <linux-kernel@...>
Date: Wednesday, June 11, 2008 - 4:13 pm

Jean Delvare wrote:
Fair point. 

On many embedded devices there is a need for i2c to be early since it is
often used for core functionality. It seems at the moment, that the 
answer to this is to juggle a few of the drivers which people need to
get this to work. There are the drivers in drivers/i2c which use 
subsys_initcall. It does work, but it feels a bit untidy. Some of the i2c
IO expander drivers are now in drivers/gpio since that comes up early.
This can lead to confusion (see drivers/gpio/pca953x.c and 
drivers/i2c/chips/pca9539.c). As David suggested, if i2c is needed early
in enough cases, why not just move it early in the link order? My patch
was just an alternative approach which mimics the current behaviour, but
makes it possible to get any i2c driver early. Why not just mark all of
the drivers/busses that get used on embedded devices as subsys_initcall,
just in case somebody needs them early?

<snip>

<snip>

I just ran a sed script over the drivers/i2c directory. The intent was to
mark the entire subsystem to come up early if CONFIG_I2C_EARLY is set,
and use i2c_module_init every where since it makes it more consistent, and
doesn't cost anything on setups where CONFIG_I2C_EARLY isn't defined.

The idea was basically that a board could clearly say: I want i2c early,
and have any busses and devices drivers it has configured as builtins
automatically be present early on.

~Ryan



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

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