* [U-Boot] [PATCH v2] mx6ul_14x14_evk: Simplify the PMIC register writes
@ 2019-02-14 13:35 Fabio Estevam
2019-02-15 5:10 ` Peng Fan
0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2019-02-14 13:35 UTC (permalink / raw)
To: u-boot
There is no need to store the values written to the PMIC inside the
'reg' variable. Make it simpler by writing the values directly.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
Changes since v1:
- Remove 1/2 notation, since this is a standalome patch
- Add Peng Fan on Cc
board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
index 595ad76bbe..636c008993 100644
--- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
+++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
@@ -86,16 +86,13 @@ int power_init_board(void)
pmic_reg_write(dev, PFUZE3000_LDOGCTL, reg);
/* SW1B step ramp up time from 2us to 4us/25mV */
- reg = 0x40;
- pmic_reg_write(dev, PFUZE3000_SW1BCONF, reg);
+ pmic_reg_write(dev, PFUZE3000_SW1BCONF, 0x40);
/* SW1B mode to APS/PFM */
- reg = 0xc;
- pmic_reg_write(dev, PFUZE3000_SW1BMODE, reg);
+ pmic_reg_write(dev, PFUZE3000_SW1BMODE, 0xc);
/* SW1B standby voltage set to 0.975V */
- reg = 0xb;
- pmic_reg_write(dev, PFUZE3000_SW1BSTBY, reg);
+ pmic_reg_write(dev, PFUZE3000_SW1BSTBY, 0xb);
return 0;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH v2] mx6ul_14x14_evk: Simplify the PMIC register writes
2019-02-14 13:35 [U-Boot] [PATCH v2] mx6ul_14x14_evk: Simplify the PMIC register writes Fabio Estevam
@ 2019-02-15 5:10 ` Peng Fan
0 siblings, 0 replies; 2+ messages in thread
From: Peng Fan @ 2019-02-15 5:10 UTC (permalink / raw)
To: u-boot
> -----Original Message-----
> From: Fabio Estevam [mailto:festevam at gmail.com]
> Sent: 2019年2月14日 21:36
> To: sbabic at denx.de
> Cc: u-boot at lists.denx.de; Peng Fan <peng.fan@nxp.com>; Fabio Estevam
> <festevam@gmail.com>
> Subject: [PATCH v2] mx6ul_14x14_evk: Simplify the PMIC register writes
>
> There is no need to store the values written to the PMIC inside the 'reg'
> variable. Make it simpler by writing the values directly.
>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
> Changes since v1:
> - Remove 1/2 notation, since this is a standalome patch
> - Add Peng Fan on Cc
>
> board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
> b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
> index 595ad76bbe..636c008993 100644
> --- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
> +++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
> @@ -86,16 +86,13 @@ int power_init_board(void)
> pmic_reg_write(dev, PFUZE3000_LDOGCTL, reg);
>
> /* SW1B step ramp up time from 2us to 4us/25mV */
> - reg = 0x40;
> - pmic_reg_write(dev, PFUZE3000_SW1BCONF, reg);
> + pmic_reg_write(dev, PFUZE3000_SW1BCONF, 0x40);
>
> /* SW1B mode to APS/PFM */
> - reg = 0xc;
> - pmic_reg_write(dev, PFUZE3000_SW1BMODE, reg);
> + pmic_reg_write(dev, PFUZE3000_SW1BMODE, 0xc);
>
> /* SW1B standby voltage set to 0.975V */
> - reg = 0xb;
> - pmic_reg_write(dev, PFUZE3000_SW1BSTBY, reg);
> + pmic_reg_write(dev, PFUZE3000_SW1BSTBY, 0xb);
Reviewed-by: Peng Fan <peng.fan@nxp.com>
>
> return 0;
> }
> --
> 2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-15 5:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-14 13:35 [U-Boot] [PATCH v2] mx6ul_14x14_evk: Simplify the PMIC register writes Fabio Estevam
2019-02-15 5:10 ` Peng Fan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox