Re: [PATCH, RFC] Earlier I2C initialization

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jean Delvare
Date: Wednesday, June 11, 2008 - 1:11 am

Hi David,

On Tue, 10 Jun 2008 13:55:07 -0700, David Brownell wrote:

Well, i2c system bus drivers shouldn't sit outside of the I2C tree, so
that's not a problem. If you start accepting that drivers live at
random places in the source tree, then there's simply no way to get
things right.

As for i2c chip drivers, that's the exact reason why I am urging
developers to create function-based subsystems rather than dumping
their drivers in drivers/i2c/chips. If we have all drivers implementing
a given function in a dedicated directory then we can sequence this
directory properly in the link order.


These were only two examples. We have i2c bus drivers depending on PCI,
parport, USB, ISA, GPIO and serio. Given the current linking order,
this makes it impossible to move I2C up in the link order without
moving all these too.

Also note that we are planing on depending on ACPI for the PC I2C bus
drivers. Which is a problem because video apparently wants to
initialize before ACPI, and now we want to initialize i2c before video.


That's easier to get right if you restrict yourself to a single
platform. For the vanilla kernel, the order of the dependencies is way
more difficult to figure out and get right. There are some hints in
drivers/Makefile but most dependencies aren't spelled out.

My feeling is that we won't be able to solve this without first moving
the different type of i2c bus drivers (and possibly chip drivers) to
separate directories. For example, moving external I2C bus drivers
(i2c-parport-light, i2c-parport, i2c-taos-evm and i2c-tiny-usb) to a
separate directory that is always initialized late, would remove the
dependencies on parport, serio and USB for the "must initialize i2c
early" problem.

I've already attempted a categorization of the i2c bus drivers:
http://lists.lm-sensors.org/pipermail/i2c/2008-May/003713.html
http://khali.linux-fr.org/devel/linux-2.6/jdelvare-i2c/i2c-group-bus-drivers.patch
I would welcome comments on this, and suggestions for further
categorization of group "other".

I guess we would need to go one step beyond and move the different
groups to different directories. I'm not too happy about moving files
as it makes history navigation a bit harder, but in this specific case
I see no other way.

-- 
Jean Delvare
--
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)