[U-Boot] [PATCH V2 05/13] i2c: Create common default i2c_set_bus_num() function
Stefano Babic
sbabic at denx.de
Tue Oct 11 09:33:58 CEST 2011
On 10/10/2011 08:26 PM, Mike Frysinger wrote:
> On Monday 10 October 2011 13:53:48 Tabi Timur-B04825 wrote:
>> On Mon, Oct 10, 2011 at 4:35 AM, Stefano Babic <sbabic at denx.de> wrote:
>>> New default, weak i2c_set_bus_num() function.
>>>
>>> Signed-off-by: Stefano Babic <sbabic at denx.de>
>>> Cc: Heiko Schocher <hs at denx.de>
>>
>> I would prefer to see a new set of I2C functions that take a bus
>> number as a parameter, so that we can eliminate i2c_set_bus_num() (and
>> the global variable it modifies) altogether.
>
> i think that'd require a much larger rework of the framework and thus would be
> better to do in addition to Stefano's work rather than in place of ?
Right - this patch is only due to the fact that the mxc_i2c.c has no
i2c_set_bus_num(), while it is present in several SOCs (not only powerpc).
I see now that the pmic patches calls i2c_set_bus_num() instead of the
macro I2C_SET_BUS(), that is protected in case CONFIG_I2C_MULTI_BUS is
not set (I have only now discovered...). Maybe I should drop my patch
and change the pmic to use this macro.
Regards,
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
More information about the U-Boot
mailing list