mx51evk: Fix pmic_init() argument
PATCH 1/4 mx51evk: Fix pmic_init() argument
From: Fabio Estevam <[email protected]>
On mx51evk board the PMIC is connected via SPI interface, so it does not make sense to pass I2C_PMIC into the pmic_init() interface.
Pass the SPI bus number via CONFIG_FSL_PMIC_BUS option instead.
--- board/freescale/mx51evk/mx51evk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
board/freescale/mx51evk/mx51evk.c +1 -1
@@ -174,7 +174,7 @@ static void power_init(void)struct pmic *p;int ret; - ret =pmic_init (I2C_PMIC ); + ret =pmic_init (CONFIG_FSL_PMIC_BUS );if (ret)return ;
Signature · 1 line
1.8.1.2
PATCH 2/4 mx31pdk: Fix pmic_init() argument
From: Fabio Estevam <[email protected]>
On mx31pdk board the PMIC is connected via SPI interface, so it does not make sense to pass I2C_PMIC into the pmic_init() interface.
Pass the SPI bus number via CONFIG_FSL_PMIC_BUS option instead.
--- board/freescale/mx31pdk/mx31pdk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
board/freescale/mx31pdk/mx31pdk.c +1 -1
@@ -85,7 +85,7 @@ int board_late_init(void)struct pmic *p;int ret; - ret =pmic_init (I2C_PMIC ); + ret =pmic_init (CONFIG_FSL_PMIC_BUS );if (ret)return ret;
Signature · 1 line
1.8.1.2
PATCH 3/4 efikamx: Fix pmic_init() argument
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
On efikamx board the PMIC is connected via SPI interface, so it does not make sense to pass I2C_PMIC into the pmic_init() interface.
Pass the SPI bus number via CONFIG_FSL_PMIC_BUS option instead.
--- board/genesi/mx51_efikamx/efikamx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
board/genesi/mx51_efikamx/efikamx.c +1 -1
@@ -159,7 +159,7 @@ static void power_init(void)struct pmic *p;int ret; - ret =pmic_init (I2C_PMIC ); + ret =pmic_init (CONFIG_FSL_PMIC_BUS );if (ret)return ;
Signature · 1 line
1.8.1.2
PATCH 4/4 power: power_fsl: Pass p->bus in the same way for SPI and I2C cases
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
There is no need to pass p->bus differently when the PMIC is connected via SPI or via I2C.
Handle the both cases in the same way.
--- drivers/power/power_fsl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/power/power_fsl.c +1 -2
@@ -36,10 +36,10 @@ int pmic_init(unsigned char bus) p->name = name; p->number_of_regs =PMIC_NUM_OF_REGS ; + p->bus = bus;#if defined(CONFIG_POWER_SPI ) p->interface =PMIC_SPI ; - p->bus =CONFIG_FSL_PMIC_BUS ; p->hw.spi.cs =CONFIG_FSL_PMIC_CS ; p->hw.spi.clk =CONFIG_FSL_PMIC_CLK ; p->hw.spi.mode =CONFIG_FSL_PMIC_MODE ;
@@ -50,7 +50,6 @@ int pmic_init(unsigned char bus) p->interface =PMIC_I2C ; p->hw.i2c.addr =CONFIG_SYS_FSL_PMIC_I2C_ADDR ; p->hw.i2c.tx_num =FSL_PMIC_I2C_LENGTH ; - p->bus = bus;#else #error "You must select CONFIG_POWER_SPI or CONFIG_PMIC_I2C"#endif
Signature · 1 line
1.8.1.2
PATCH 1/4 mx51evk: Fix pmic_init() argument
In reply to Fabio EstevamQuoted 18 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
On mx51evk board the PMIC is connected via SPI interface, so it does not make sense to pass
I2C_PMICinto thepmic_init()interface.Pass the SPI bus number via
CONFIG_FSL_PMIC_BUSoption instead.Signed-off-by Fabio Estevam <[email protected]>--- board/freescale/mx51evk/mx51evk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)board/freescale/mx51evk/mx51evk.c +0
-0
board/freescale/mx51evk/mx51evk.c static void power_init(void) · line 180
Quoted 8 lines
board/freescale/mx51evk/mx51evk.c +1
-1@@ -174,7 +174,7 @@ static void power_init(void)struct pmic *p;int ret; - ret =pmic_init (I2C_PMIC ); + ret =pmic_init (CONFIG_FSL_PMIC_BUS );if (ret)return ;
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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 =====================================================================
PATCH 1/4 mx51evk: Fix pmic_init() argument
In reply to Fabio EstevamQuoted 9 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
On mx51evk board the PMIC is connected via SPI interface, so it does not make sense to pass
I2C_PMICinto thepmic_init()interface.Pass the SPI bus number via
CONFIG_FSL_PMIC_BUSoption instead.Signed-off-by Fabio Estevam <[email protected]>---
Applied to u-boot-imx, thanks.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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 =====================================================================
PATCH 2/4 mx31pdk: Fix pmic_init() argument
In reply to Fabio EstevamQuoted 9 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
On mx31pdk board the PMIC is connected via SPI interface, so it does not make sense to pass
I2C_PMICinto thepmic_init()interface.Pass the SPI bus number via
CONFIG_FSL_PMIC_BUSoption instead.Signed-off-by Fabio Estevam <[email protected]>---
Applied to u-boot-imx, thanks.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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 =====================================================================
PATCH 3/4 efikamx: Fix pmic_init() argument
In reply to Fabio EstevamQuoted 9 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
On efikamx board the PMIC is connected via SPI interface, so it does not make sense to pass
I2C_PMICinto thepmic_init()interface.Pass the SPI bus number via
CONFIG_FSL_PMIC_BUSoption instead.Signed-off-by Fabio Estevam <[email protected]>---
Applied to u-boot-imx, thanks.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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 =====================================================================
PATCH 4/4 power: power_fsl: Pass p->bus in the same way for SPI and I2C cases
In reply to Fabio EstevamQuoted 9 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
There is no need to pass
p->busdifferently when the PMIC is connected via SPI or via I2C.Handle the both cases in the same way.
Signed-off-by Fabio Estevam <[email protected]>---
Applied to u-boot-imx, thanks.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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 =====================================================================