Skip to contentSkip to conversation

mx6ul_14x14_evk: Simplify the PMIC register writes

PATCH Superseded Fabio Estevam 1 participant 1 message Feb 14, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 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.

---
 board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c +3 -6
index 595ad76bbe..636c008993 100644
@@ -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;
 }
Signature · 1 line
2.17.1