[U-Boot] [PATCH v2 3/5] pmic_fsl: Introduce CONFIG_SYS_FSL_PMIC_I2C_LENGTH

Stefano Babic sbabic at denx.de
Mon Oct 22 18:16:00 CEST 2012


Am 22/10/2012 17:22, schrieb Fabio Estevam:
> On Tue, Oct 16, 2012 at 11:39 AM, Stefano Babic <sbabic at denx.de> wrote:
> 
>>> --- a/drivers/misc/pmic_fsl.c
>>> +++ b/drivers/misc/pmic_fsl.c
>>> @@ -53,7 +53,7 @@ int pmic_init(void)
>>>  #elif defined(CONFIG_PMIC_I2C)
>>>       p->interface = PMIC_I2C;
>>>       p->hw.i2c.addr = CONFIG_SYS_FSL_PMIC_I2C_ADDR;
>>> -     p->hw.i2c.tx_num = 3;
>>> +     p->hw.i2c.tx_num = CONFIG_SYS_FSL_PMIC_I2C_LENGTH;
>>
>> The bad thing with it is that it seems that each board can have a
>> different value. However, this is bound to the selected pmic and not to
>> the board. So IMHO it should not go into the board configuration file,
>> but in the pmic specific initialization.
> 
> Ok, understood.
> 
> What about putting CONFIG_SYS_FSL_PMIC_I2C_LENGTH inside the PMIC
> include file, such as
> include/dialog_pmic.h
> include/mc13783.h
> include/mc13892.h ?

Apart changing the name (the prefix CONFIG_SYS_ should be not used), I
think it is a praticable solution.

Best regards,
Stefano Babic


-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================


More information about the U-Boot mailing list