* [U-Boot] [PATCH 1/4] mx51evk: Fix pmic_init() argument
@ 2013-11-20 22:26 Fabio Estevam
2013-11-20 22:26 ` [U-Boot] [PATCH 2/4] mx31pdk: " Fabio Estevam
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Fabio Estevam @ 2013-11-20 22:26 UTC (permalink / raw)
To: u-boot
From: Fabio Estevam <fabio.estevam@freescale.com>
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.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
board/freescale/mx51evk/mx51evk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c
index d01465e..9b43c84 100644
--- a/board/freescale/mx51evk/mx51evk.c
+++ b/board/freescale/mx51evk/mx51evk.c
@@ -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;
--
1.8.1.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 2/4] mx31pdk: Fix pmic_init() argument
2013-11-20 22:26 [U-Boot] [PATCH 1/4] mx51evk: Fix pmic_init() argument Fabio Estevam
@ 2013-11-20 22:26 ` Fabio Estevam
2013-11-27 8:42 ` Stefano Babic
2013-11-20 22:26 ` [U-Boot] [PATCH 3/4] efikamx: " Fabio Estevam
` (3 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Fabio Estevam @ 2013-11-20 22:26 UTC (permalink / raw)
To: u-boot
From: Fabio Estevam <fabio.estevam@freescale.com>
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.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
board/freescale/mx31pdk/mx31pdk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/freescale/mx31pdk/mx31pdk.c b/board/freescale/mx31pdk/mx31pdk.c
index 148b4f4..13b9d51 100644
--- a/board/freescale/mx31pdk/mx31pdk.c
+++ b/board/freescale/mx31pdk/mx31pdk.c
@@ -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;
--
1.8.1.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 3/4] efikamx: Fix pmic_init() argument
2013-11-20 22:26 [U-Boot] [PATCH 1/4] mx51evk: Fix pmic_init() argument Fabio Estevam
2013-11-20 22:26 ` [U-Boot] [PATCH 2/4] mx31pdk: " Fabio Estevam
@ 2013-11-20 22:26 ` Fabio Estevam
2013-11-27 8:43 ` Stefano Babic
2013-11-20 22:26 ` [U-Boot] [PATCH 4/4] power: power_fsl: Pass p->bus in the same way for SPI and I2C cases Fabio Estevam
` (2 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Fabio Estevam @ 2013-11-20 22:26 UTC (permalink / raw)
To: u-boot
From: Fabio Estevam <fabio.estevam@freescale.com>
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.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
board/genesi/mx51_efikamx/efikamx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/genesi/mx51_efikamx/efikamx.c b/board/genesi/mx51_efikamx/efikamx.c
index 76753f9..16769e5 100644
--- a/board/genesi/mx51_efikamx/efikamx.c
+++ b/board/genesi/mx51_efikamx/efikamx.c
@@ -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;
--
1.8.1.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 4/4] power: power_fsl: Pass p->bus in the same way for SPI and I2C cases
2013-11-20 22:26 [U-Boot] [PATCH 1/4] mx51evk: Fix pmic_init() argument Fabio Estevam
2013-11-20 22:26 ` [U-Boot] [PATCH 2/4] mx31pdk: " Fabio Estevam
2013-11-20 22:26 ` [U-Boot] [PATCH 3/4] efikamx: " Fabio Estevam
@ 2013-11-20 22:26 ` Fabio Estevam
2013-11-27 8:43 ` Stefano Babic
2013-11-21 15:14 ` [U-Boot] [PATCH 1/4] mx51evk: Fix pmic_init() argument Stefano Babic
2013-11-27 8:42 ` Stefano Babic
4 siblings, 1 reply; 9+ messages in thread
From: Fabio Estevam @ 2013-11-20 22:26 UTC (permalink / raw)
To: u-boot
From: Fabio Estevam <fabio.estevam@freescale.com>
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.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
drivers/power/power_fsl.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/power/power_fsl.c b/drivers/power/power_fsl.c
index ed778f3..ac0b541 100644
--- a/drivers/power/power_fsl.c
+++ b/drivers/power/power_fsl.c
@@ -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
--
1.8.1.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 1/4] mx51evk: Fix pmic_init() argument
2013-11-20 22:26 [U-Boot] [PATCH 1/4] mx51evk: Fix pmic_init() argument Fabio Estevam
` (2 preceding siblings ...)
2013-11-20 22:26 ` [U-Boot] [PATCH 4/4] power: power_fsl: Pass p->bus in the same way for SPI and I2C cases Fabio Estevam
@ 2013-11-21 15:14 ` Stefano Babic
2013-11-27 8:42 ` Stefano Babic
4 siblings, 0 replies; 9+ messages in thread
From: Stefano Babic @ 2013-11-21 15:14 UTC (permalink / raw)
To: u-boot
On 20/11/2013 23:26, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> 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.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> board/freescale/mx51evk/mx51evk.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c
> index d01465e..9b43c84 100644
> --- a/board/freescale/mx51evk/mx51evk.c
> +++ b/board/freescale/mx51evk/mx51evk.c
> @@ -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;
>
>
Acked-by: Stefano Babic <sbabic@denx.de>
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
=====================================================================
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 1/4] mx51evk: Fix pmic_init() argument
2013-11-20 22:26 [U-Boot] [PATCH 1/4] mx51evk: Fix pmic_init() argument Fabio Estevam
` (3 preceding siblings ...)
2013-11-21 15:14 ` [U-Boot] [PATCH 1/4] mx51evk: Fix pmic_init() argument Stefano Babic
@ 2013-11-27 8:42 ` Stefano Babic
4 siblings, 0 replies; 9+ messages in thread
From: Stefano Babic @ 2013-11-27 8:42 UTC (permalink / raw)
To: u-boot
On 20/11/2013 23:26, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> 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.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
Applied to u-boot-imx, thanks.
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
=====================================================================
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 2/4] mx31pdk: Fix pmic_init() argument
2013-11-20 22:26 ` [U-Boot] [PATCH 2/4] mx31pdk: " Fabio Estevam
@ 2013-11-27 8:42 ` Stefano Babic
0 siblings, 0 replies; 9+ messages in thread
From: Stefano Babic @ 2013-11-27 8:42 UTC (permalink / raw)
To: u-boot
On 20/11/2013 23:26, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> 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.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
Applied to u-boot-imx, thanks.
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
=====================================================================
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 3/4] efikamx: Fix pmic_init() argument
2013-11-20 22:26 ` [U-Boot] [PATCH 3/4] efikamx: " Fabio Estevam
@ 2013-11-27 8:43 ` Stefano Babic
0 siblings, 0 replies; 9+ messages in thread
From: Stefano Babic @ 2013-11-27 8:43 UTC (permalink / raw)
To: u-boot
On 20/11/2013 23:26, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> 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.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
Applied to u-boot-imx, thanks.
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
=====================================================================
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 4/4] power: power_fsl: Pass p->bus in the same way for SPI and I2C cases
2013-11-20 22:26 ` [U-Boot] [PATCH 4/4] power: power_fsl: Pass p->bus in the same way for SPI and I2C cases Fabio Estevam
@ 2013-11-27 8:43 ` Stefano Babic
0 siblings, 0 replies; 9+ messages in thread
From: Stefano Babic @ 2013-11-27 8:43 UTC (permalink / raw)
To: u-boot
On 20/11/2013 23:26, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> 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.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
Applied to u-boot-imx, thanks.
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
=====================================================================
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-11-27 8:43 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-20 22:26 [U-Boot] [PATCH 1/4] mx51evk: Fix pmic_init() argument Fabio Estevam
2013-11-20 22:26 ` [U-Boot] [PATCH 2/4] mx31pdk: " Fabio Estevam
2013-11-27 8:42 ` Stefano Babic
2013-11-20 22:26 ` [U-Boot] [PATCH 3/4] efikamx: " Fabio Estevam
2013-11-27 8:43 ` Stefano Babic
2013-11-20 22:26 ` [U-Boot] [PATCH 4/4] power: power_fsl: Pass p->bus in the same way for SPI and I2C cases Fabio Estevam
2013-11-27 8:43 ` Stefano Babic
2013-11-21 15:14 ` [U-Boot] [PATCH 1/4] mx51evk: Fix pmic_init() argument Stefano Babic
2013-11-27 8:42 ` Stefano Babic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox