mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
imx: Explicitly pass the I2C bus number in pmic_init()
The pmic_init() function has the I2C or SPI bus number that is connected to the PMIC. Instead of passing I2C_PMIC, explicitly pass the I2C bus number via I2C_x definition. The motivation for doing this is to avoid people just doing a copy and paste of I2C_PMIC into their board file when another I2C bus is actually used to interface to their PMIC. This also makes more obvious which is the I2C bus connected to the PMIC, without having to search in the source code for the meaning of the 'I2C_PMIC' number. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Stefano Babic <sbabic@denx.de>
This commit is contained in:
parent
db6801dec3
commit
570aa2fac3
4 changed files with 4 additions and 4 deletions
|
@ -138,7 +138,7 @@ int board_late_init(void)
|
|||
|
||||
mx25pdk_fec_init();
|
||||
|
||||
ret = pmic_init(I2C_PMIC);
|
||||
ret = pmic_init(I2C_0);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
|
|
@ -213,7 +213,7 @@ int board_late_init(void)
|
|||
struct pmic *p;
|
||||
int ret;
|
||||
|
||||
ret = pmic_init(I2C_PMIC);
|
||||
ret = pmic_init(I2C_0);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ void power_init(void)
|
|||
struct pmic *p;
|
||||
int ret;
|
||||
|
||||
ret = pmic_init(I2C_PMIC);
|
||||
ret = pmic_init(I2C_0);
|
||||
if (ret)
|
||||
return;
|
||||
|
||||
|
|
|
@ -258,7 +258,7 @@ static int power_init(void)
|
|||
}
|
||||
|
||||
if (!i2c_probe(CONFIG_SYS_FSL_PMIC_I2C_ADDR)) {
|
||||
ret = pmic_init(I2C_PMIC);
|
||||
ret = pmic_init(I2C_0);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
|
Loading…
Reference in a new issue