]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mx6ul_14x14_evk: Simplify the PMIC register writes
authorFabio Estevam <festevam@gmail.com>
Thu, 14 Feb 2019 13:35:46 +0000 (11:35 -0200)
committerStefano Babic <sbabic@denx.de>
Wed, 13 Mar 2019 08:14:35 +0000 (09:14 +0100)
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>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c

index 595ad76bbecb57f0d7c7a063886abd1d875d13bd..636c008993b4d642da8d0b5e0530dd2afb0c1e0c 100644 (file)
@@ -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;
 }