login
Header Space

 
 

Re: [PATCHv4 2.6.25] i2c: adds support for i2c bus on Freescale CPM1/CPM2 controllers

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jean Delvare <khali@...>
Cc: Jochen Friedrich <jochen@...>, <linux-kernel@...>, linuxppc-dev list <linuxppc-dev@...>, <i2c@...>, Scott Wood <scottwood@...>
Date: Sunday, February 24, 2008 - 12:19 pm

On 2/22/08, Jochen Friedrich <jochen@scram.de> wrote:

The correct statement is: modify the i2c subsystem to support the
standard kernel driver aliasing mechanism. Leaving powerpc and OF out
of the argument for the moment, i2c has a custom aliasing scheme on
the x86 too.

So as a first step, can we remove the custom i2c aliasing scheme and
change i2c to use standard module aliases on the x86? Patches for this
already exist.

On 2/23/08, Jean Delvare <khali@linux-fr.org> wrote:

I think there is some confusion here. The OF aliases are only used by
the kernel to load the correct driver. Would doing something like this
help?

static struct i2c_device_id pcf8563_id[] = {
	{"pcf8563", 0, "sysfs_legacy_name"},
	{"rtc8564", 0, "sysfs_legacy_name"},
	OF_ID("phillips,pcf8563", &pcf8563_id[0], 0)
	OF_ID("epson,rtc8564", &pcf8563_id[1], 0)
	{},
};
MODULE_DEVICE_TABLE(i2c, pcf8563_id);

Then in the probe function you can use the pointer to find the base id
entry and i2c never has to be aware that the OF alias exists.


Not really practical for the millions of machines (all PowerPC Macs)
already shipped.


Audio codecs have exactly the same problem. There are probably other
devices that also need mapping.

This mapping table will need to contain a map from the OF names to the
kernel driver names.  It will need to stored permanently in RAM and
contain all possible mappings. This table will only grow in size.

The kernel has a widely used mechanism for mapping -- aliases in the
device drivers. Why do we want to build a new, parallel one?

What we are doing now is option 4.

4. Use kconfig to build custom kernels for each target system. Don't
load drivers automatically based on what the BIOS tells us.

-- 
Jon Smirl
jonsmirl@gmail.com
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCHv4 2.6.25] i2c: adds support for i2c bus on Freesc..., Jon Smirl, (Sun Feb 24, 12:19 pm)
Re: [PATCHv4 2.6.25] i2c: adds support for i2c bus on Freesc..., Jochen Friedrich, (Sun Feb 24, 11:16 am)
Re: [PATCHv4 2.6.25] i2c: adds support for i2c bus on Freesc..., Jochen Friedrich, (Mon Feb 25, 12:48 pm)
speck-geostationary