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: Jochen Friedrich <jochen@...>
Cc: Scott Wood <scottwood@...>, Kumar Gala <galak@...>, Vitaly Bordug <vitb@...>, <linux-kernel@...>, linuxppc-dev list <linuxppc-dev@...>, <i2c@...>
Date: Saturday, February 23, 2008 - 8:43 am

Hi Jochen,

On Fri, 22 Feb 2008 12:16:16 +0100, Jochen Friedrich wrote:

The problem I have with this is that it breaks compatibility. The chip
name is not only used for device/driver matching, it is also exported
to userspace as a sysfs attribute ("name"). Applications might rely on
it. At least libsensors does.

One way to work around the problem would be to use separate fields for
device/driver matching and the "name" attribute. However, this will add
some complexity to the i2c-core code and cost some memory as well, so
it is far from perfect.


This would work, and it would require almost no change to the current
i2c-core code, but I thought that these dts files were not under our
control?

The problem I see with this approach is that the name translation would
have to be done for each dts file, rather than just once for each device
type. This means more work, but maybe this can be done if at least part
of it is automated. I admit that I never considered this option because
I considered the dts files as read-only. If this assumption was
incorrect, then maybe this is the best solution. Can you please
elaborate on the details of this proposal?


This is what we do at the moment (see i2c_devices in
arch/powerpc/sysdev/fsl_soc.c). Jon Smirl is worried that it won't
scale well though, and I can't disagree.


I still have to think about it. I didn't have much time to work on this
during the last 2 weeks, hopefully I will fine some time to experiment
again soon. As I underlined before, my patch set affects no less than 5
subsystems with different needs and expectations, it's no trivial
change.

-- 
Jean Delvare
--
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..., 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)
Re: [PATCHv4 2.6.25] i2c: adds support for i2c bus on Freesc..., Jean Delvare, (Sat Feb 23, 8:43 am)
speck-geostationary