]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
imx: Explicitly pass the I2C bus number in pmic_init()
authorFabio Estevam <fabio.estevam@freescale.com>
Wed, 20 Nov 2013 23:17:36 +0000 (21:17 -0200)
committerStefano Babic <sbabic@denx.de>
Tue, 17 Dec 2013 15:54:16 +0000 (16:54 +0100)
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>
board/freescale/mx25pdk/mx25pdk.c
board/freescale/mx35pdk/mx35pdk.c
board/freescale/mx53evk/mx53evk.c
board/freescale/mx53loco/mx53loco.c

index ebe3bcb6edddd0687e5cb8c38fd3d3d542e25b52..71a395c226c5a444b510c7d0147048e2e2f6c220 100644 (file)
@@ -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;
 
index 9fabef5af57c82666b17e65e5d1618e082889183..12467a9adaea90c717d361b87468a8a09285f419 100644 (file)
@@ -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;
 
index 3b398b6d76e77e9bf7d0bb98995a423534331ebd..13519e26da28c546fd877cca3927ef59dbba8b04 100644 (file)
@@ -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;
 
index ae7eca85b08202c05cfe07fb263a0224518e5da4..db0bf17363e17346adc9e1357246595d9576f33c 100644 (file)
@@ -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;