MAX77654 Ultra-Low Power PMIC Mbed Driver

Revision:
3:1e7cafcfdae7
Parent:
2:951902a65736
Child:
4:77203c01b399
--- a/MAX77654.cpp	Wed Apr 27 14:52:02 2022 +0300
+++ b/MAX77654.cpp	Fri Aug 26 14:54:45 2022 +0300
@@ -127,7 +127,7 @@
 int MAX77654::GetThermalOverload(ercflag_t *ercflag)
 {
 	int ret;
-	reg_ercflag_t reg_ercflag;
+	reg_ercflag_t reg_ercflag = {0};
 
 	ret = read_register(ERCFLAG, (uint8_t *)&(reg_ercflag));
 	if (ret != MAX77654_NO_ERROR) {
@@ -142,7 +142,7 @@
 int MAX77654::GetSysOvervoltageLockout(ercflag_t *ercflag)
 {
 	int ret;
-	reg_ercflag_t reg_ercflag;
+	reg_ercflag_t reg_ercflag = {0};
 
 	ret = read_register(ERCFLAG, (uint8_t *)&(reg_ercflag));
 	if (ret != MAX77654_NO_ERROR) {
@@ -157,7 +157,7 @@
 int MAX77654::GetSysUndervoltageLockout(ercflag_t *ercflag)
 {
 	int ret;
-	reg_ercflag_t reg_ercflag;
+	reg_ercflag_t reg_ercflag = {0};
 
 	ret = read_register(ERCFLAG, (uint8_t *)&(reg_ercflag));
 	if (ret != MAX77654_NO_ERROR) {
@@ -172,7 +172,7 @@
 int MAX77654::GetManualResetTimer(ercflag_t *ercflag)
 {
 	int ret;
-	reg_ercflag_t reg_ercflag;
+	reg_ercflag_t reg_ercflag = {0};
 
 	ret = read_register(ERCFLAG, (uint8_t *)&(reg_ercflag));
 	if (ret != MAX77654_NO_ERROR) {
@@ -187,7 +187,7 @@
 int MAX77654::GetSoftwareOffFlag(ercflag_t *ercflag)
 {
 	int ret;
-	reg_ercflag_t reg_ercflag;
+	reg_ercflag_t reg_ercflag = {0};
 
 	ret = read_register(ERCFLAG, (uint8_t *)&(reg_ercflag));
 	if (ret != MAX77654_NO_ERROR) {
@@ -202,7 +202,7 @@
 int MAX77654::GetSoftwareColdResetFlag(ercflag_t *ercflag)
 {
 	int ret;
-	reg_ercflag_t reg_ercflag;
+	reg_ercflag_t reg_ercflag = {0};
 
 	ret = read_register(ERCFLAG, (uint8_t *)&(reg_ercflag));
 	if (ret != MAX77654_NO_ERROR) {
@@ -217,7 +217,7 @@
 int MAX77654::GetWatchdogTimerOffFlag(ercflag_t *ercflag)
 {
 	int ret;
-	reg_ercflag_t reg_ercflag;
+	reg_ercflag_t reg_ercflag = {0};
 
 	ret = read_register(ERCFLAG, (uint8_t *)&(reg_ercflag));
 	if (ret != MAX77654_NO_ERROR) {
@@ -232,7 +232,7 @@
 int MAX77654::GetWatchdogTimerResetFlag(ercflag_t *ercflag)
 {
 	int ret;
-	reg_ercflag_t reg_ercflag;
+	reg_ercflag_t reg_ercflag = {0};
 
 	ret = read_register(ERCFLAG, (uint8_t *)&(reg_ercflag));
 	if (ret != MAX77654_NO_ERROR) {
@@ -247,7 +247,7 @@
 int MAX77654::GetDeviceIdentification(didm_t *didm)
 {
     int ret;
-    reg_stat_glbl_t reg_stat_glbl;
+    reg_stat_glbl_t reg_stat_glbl = {0};
 
     ret = read_register(STAT_GLBL, (uint8_t *)&(reg_stat_glbl));
     if (ret != MAX77654_NO_ERROR) {
@@ -262,7 +262,7 @@
 int MAX77654::GetBOKInterruptStatus(bok_t* bok)
 {
     int ret;
-    reg_stat_glbl_t reg_stat_glbl;
+    reg_stat_glbl_t reg_stat_glbl = {0};
 
     ret = read_register(STAT_GLBL, (uint8_t *)&(reg_stat_glbl));
     if (ret != MAX77654_NO_ERROR) {
@@ -277,7 +277,7 @@
 int MAX77654::GetLDO0DropoutRisingStatus(dod0_s_t* dod0_s)
 {
     int ret;
-    reg_stat_glbl_t reg_stat_glbl;
+    reg_stat_glbl_t reg_stat_glbl = {0};
 
     ret = read_register(STAT_GLBL, (uint8_t *)&(reg_stat_glbl));
     if (ret != MAX77654_NO_ERROR) {
@@ -292,7 +292,7 @@
 int MAX77654::GetLDO1DropoutRisingStatus(dod1_s_t* dod1_s)
 {
     int ret;
-    reg_stat_glbl_t reg_stat_glbl;
+    reg_stat_glbl_t reg_stat_glbl = {0};
 
     ret = read_register(STAT_GLBL, (uint8_t *)&(reg_stat_glbl));
     if (ret != MAX77654_NO_ERROR) {
@@ -307,7 +307,7 @@
 int MAX77654::GetThermalAlarm2Status(tjal2_s_t* tjal2_s)
 {
     int ret;
-    reg_stat_glbl_t reg_stat_glbl;
+    reg_stat_glbl_t reg_stat_glbl = {0};
 
     ret = read_register(STAT_GLBL, (uint8_t *)&(reg_stat_glbl));
     if (ret != MAX77654_NO_ERROR) {
@@ -322,7 +322,7 @@
 int MAX77654::GetThermalAlarm1Status(tjal1_s_t* tjal1_s)
 {
     int ret;
-    reg_stat_glbl_t reg_stat_glbl;
+    reg_stat_glbl_t reg_stat_glbl = {0};
 
     ret = read_register(STAT_GLBL, (uint8_t *)&(reg_stat_glbl));
     if (ret != MAX77654_NO_ERROR) {
@@ -337,7 +337,7 @@
 int MAX77654::GetnENDebouncedStatus(stat_en_t* stat_en)
 {
     int ret;
-    reg_stat_glbl_t reg_stat_glbl;
+    reg_stat_glbl_t reg_stat_glbl = {0};
 
     ret = read_register(STAT_GLBL, (uint8_t *)&(reg_stat_glbl));
     if (ret != MAX77654_NO_ERROR) {
@@ -352,7 +352,7 @@
 int MAX77654::GetSoftwareVersionGateDrive(stat_irq_t* stat_irq)
 {
     int ret;
-    reg_stat_glbl_t reg_stat_glbl;
+    reg_stat_glbl_t reg_stat_glbl = {0};
 
     ret = read_register(STAT_GLBL, (uint8_t *)&(reg_stat_glbl));
     if (ret != MAX77654_NO_ERROR) {
@@ -366,7 +366,7 @@
 
 int MAX77654::SetLDO1FaultInterruptMask(intm_t intm)
 {
-	reg_intm_glbl1_t reg_intm_glbl1;
+	reg_intm_glbl1_t reg_intm_glbl1 = {0};
 
     SET_BIT_FIELD(INTM_GLBL1, reg_intm_glbl1, reg_intm_glbl1.bits.ldo1_m, intm);
 
@@ -376,7 +376,7 @@
 int MAX77654::GetLDO1FaultInterruptMask(intm_t* intm)
 {
     int ret;
-    reg_intm_glbl1_t reg_intm_glbl1;
+    reg_intm_glbl1_t reg_intm_glbl1 = {0};
 
     ret = read_register(INTM_GLBL1, (uint8_t *)&(reg_intm_glbl1));
     if (ret != MAX77654_NO_ERROR) {
@@ -390,7 +390,7 @@
 
 int MAX77654::SetLDO0FaultInterruptMask(intm_t intm)
 {
-	reg_intm_glbl1_t reg_intm_glbl1;
+	reg_intm_glbl1_t reg_intm_glbl1 = {0};
 
     SET_BIT_FIELD(INTM_GLBL1, reg_intm_glbl1, reg_intm_glbl1.bits.ldo0_m, intm);
 
@@ -400,7 +400,7 @@
 int MAX77654::GetLDO0FaultInterruptMask(intm_t* intm)
 {
     int ret;
-    reg_intm_glbl1_t reg_intm_glbl1;
+    reg_intm_glbl1_t reg_intm_glbl1 = {0};
 
     ret = read_register(INTM_GLBL1, (uint8_t *)&(reg_intm_glbl1));
     if (ret != MAX77654_NO_ERROR) {
@@ -414,7 +414,7 @@
 
 int MAX77654::SetSBBTimeoutMask(intm_t intm)
 {
-	reg_intm_glbl1_t reg_intm_glbl1;
+	reg_intm_glbl1_t reg_intm_glbl1 = {0};
 
     SET_BIT_FIELD(INTM_GLBL1, reg_intm_glbl1, reg_intm_glbl1.bits.sbb_to_m, intm);
 
@@ -424,7 +424,7 @@
 int MAX77654::GetSBBTimeoutMask(intm_t* intm)
 {
     int ret;
-    reg_intm_glbl1_t reg_intm_glbl1;
+    reg_intm_glbl1_t reg_intm_glbl1 = {0};
 
     ret = read_register(INTM_GLBL1, (uint8_t *)&(reg_intm_glbl1));
     if (ret != MAX77654_NO_ERROR) {
@@ -438,7 +438,7 @@
 
 int MAX77654::SetGPI2RisingInterruptMask(intm_t intm)
 {
-	reg_intm_glbl1_t reg_intm_glbl1;
+	reg_intm_glbl1_t reg_intm_glbl1 = {0};
 
     SET_BIT_FIELD(INTM_GLBL1, reg_intm_glbl1, reg_intm_glbl1.bits.gpi2_rm, intm);
 
@@ -448,7 +448,7 @@
 int MAX77654::GetGPI2RisingInterruptMask(intm_t* intm)
 {
     int ret;
-    reg_intm_glbl1_t reg_intm_glbl1;
+    reg_intm_glbl1_t reg_intm_glbl1 = {0};
 
     ret = read_register(INTM_GLBL1, (uint8_t *)&(reg_intm_glbl1));
     if (ret != MAX77654_NO_ERROR) {
@@ -462,7 +462,7 @@
 
 int MAX77654::SetGPI2FallingInterruptMask(intm_t intm)
 {
-	reg_intm_glbl1_t reg_intm_glbl1;
+	reg_intm_glbl1_t reg_intm_glbl1 = {0};
 
     SET_BIT_FIELD(INTM_GLBL1, reg_intm_glbl1, reg_intm_glbl1.bits.gpi2_fm, intm);
 
@@ -472,7 +472,7 @@
 int MAX77654::GetGPI2FallingInterruptMask(intm_t* intm)
 {
     int ret;
-    reg_intm_glbl1_t reg_intm_glbl1;
+    reg_intm_glbl1_t reg_intm_glbl1 = {0};
 
     ret = read_register(INTM_GLBL1, (uint8_t *)&(reg_intm_glbl1));
     if (ret != MAX77654_NO_ERROR) {
@@ -486,7 +486,7 @@
 
 int MAX77654::SetGPI1RisingInterruptMask(intm_t intm)
 {
-	reg_intm_glbl1_t reg_intm_glbl1;
+	reg_intm_glbl1_t reg_intm_glbl1 = {0};
 
     SET_BIT_FIELD(INTM_GLBL1, reg_intm_glbl1, reg_intm_glbl1.bits.gpi1_rm, intm);
 
@@ -496,7 +496,7 @@
 int MAX77654::GetGPI1RisingInterruptMask(intm_t* intm)
 {
     int ret;
-    reg_intm_glbl1_t reg_intm_glbl1;
+    reg_intm_glbl1_t reg_intm_glbl1 = {0};
 
     ret = read_register(INTM_GLBL1, (uint8_t *)&(reg_intm_glbl1));
     if (ret != MAX77654_NO_ERROR) {
@@ -510,7 +510,7 @@
 
 int MAX77654::SetGPI1FallingInterruptMask(intm_t intm)
 {
-	reg_intm_glbl1_t reg_intm_glbl1;
+	reg_intm_glbl1_t reg_intm_glbl1 = {0};
 
     SET_BIT_FIELD(INTM_GLBL1, reg_intm_glbl1, reg_intm_glbl1.bits.gpi1_fm, intm);
 
@@ -520,7 +520,7 @@
 int MAX77654::GetGPI1FallingInterruptMask(intm_t* intm)
 {
     int ret;
-    reg_intm_glbl1_t reg_intm_glbl1;
+    reg_intm_glbl1_t reg_intm_glbl1 = {0};
 
     ret = read_register(INTM_GLBL1, (uint8_t *)&(reg_intm_glbl1));
     if (ret != MAX77654_NO_ERROR) {
@@ -534,7 +534,7 @@
 
 int MAX77654::SetDropout0RisingInterruptMask(intm_t intm)
 {
-	reg_intm_glbl0_t reg_intm_glbl0;
+	reg_intm_glbl0_t reg_intm_glbl0 = {0};
 
     SET_BIT_FIELD(INTM_GLBL0, reg_intm_glbl0, reg_intm_glbl0.bits.dod0_rm, intm);
 
@@ -544,7 +544,7 @@
 int MAX77654::GetDropout0RisingInterruptMask(intm_t* intm)
 {
     int ret;
-    reg_intm_glbl0_t reg_intm_glbl0;
+    reg_intm_glbl0_t reg_intm_glbl0 = {0};
 
     ret = read_register(INTM_GLBL0, (uint8_t *)&(reg_intm_glbl0));
     if (ret != MAX77654_NO_ERROR) {
@@ -558,7 +558,7 @@
 
 int MAX77654::SetDropout1RisingInterruptMask(intm_t intm)
 {
-	reg_intm_glbl0_t reg_intm_glbl0;
+	reg_intm_glbl0_t reg_intm_glbl0 = {0};
 
     SET_BIT_FIELD(INTM_GLBL0, reg_intm_glbl0, reg_intm_glbl0.bits.dod1_rm, intm);
 
@@ -568,7 +568,7 @@
 int MAX77654::GetDropout1RisingInterruptMask(intm_t* intm)
 {
     int ret;
-    reg_intm_glbl0_t reg_intm_glbl0;
+    reg_intm_glbl0_t reg_intm_glbl0 = {0};
 
     ret = read_register(INTM_GLBL0, (uint8_t *)&(reg_intm_glbl0));
     if (ret != MAX77654_NO_ERROR) {
@@ -582,7 +582,7 @@
 
 int MAX77654::SetThermalAlarm2RisingInterruptMask(intm_t intm)
 {
-	reg_intm_glbl0_t reg_intm_glbl0;
+	reg_intm_glbl0_t reg_intm_glbl0 = {0};
 
     SET_BIT_FIELD(INTM_GLBL0, reg_intm_glbl0, reg_intm_glbl0.bits.tjal2_rm, intm);
 
@@ -592,7 +592,7 @@
 int MAX77654::GetThermalAlarm2RisingInterruptMask(intm_t* intm)
 {
     int ret;
-    reg_intm_glbl0_t reg_intm_glbl0;
+    reg_intm_glbl0_t reg_intm_glbl0 = {0};
 
     ret = read_register(INTM_GLBL0, (uint8_t *)&(reg_intm_glbl0));
     if (ret != MAX77654_NO_ERROR) {
@@ -606,7 +606,7 @@
 
 int MAX77654::SetThermalAlarm1RisingInterruptMask(intm_t intm)
 {
-	reg_intm_glbl0_t reg_intm_glbl0;
+	reg_intm_glbl0_t reg_intm_glbl0 = {0};
 
     SET_BIT_FIELD(INTM_GLBL0, reg_intm_glbl0, reg_intm_glbl0.bits.tjal1_rm, intm);
 
@@ -616,7 +616,7 @@
 int MAX77654::GetThermalAlarm1RisingInterruptMask(intm_t* intm)
 {
     int ret;
-    reg_intm_glbl0_t reg_intm_glbl0;
+    reg_intm_glbl0_t reg_intm_glbl0 = {0};
 
     ret = read_register(INTM_GLBL0, (uint8_t *)&(reg_intm_glbl0));
     if (ret != MAX77654_NO_ERROR) {
@@ -630,7 +630,7 @@
 
 int MAX77654::SetnENRisingInterruptMask(intm_t intm)
 {
-	reg_intm_glbl0_t reg_intm_glbl0;
+	reg_intm_glbl0_t reg_intm_glbl0 = {0};
 
     SET_BIT_FIELD(INTM_GLBL0, reg_intm_glbl0, reg_intm_glbl0.bits.nen_rm, intm);
 
@@ -640,7 +640,7 @@
 int MAX77654::GetnENRisingInterruptMask(intm_t* intm)
 {
     int ret;
-    reg_intm_glbl0_t reg_intm_glbl0;
+    reg_intm_glbl0_t reg_intm_glbl0 = {0};
 
     ret = read_register(INTM_GLBL0, (uint8_t *)&(reg_intm_glbl0));
     if (ret != MAX77654_NO_ERROR) {
@@ -654,7 +654,7 @@
 
 int MAX77654::SetnENFallingInterruptMask(intm_t intm)
 {
-	reg_intm_glbl0_t reg_intm_glbl0;
+	reg_intm_glbl0_t reg_intm_glbl0 = {0};
 
     SET_BIT_FIELD(INTM_GLBL0, reg_intm_glbl0, reg_intm_glbl0.bits.nen_fm, intm);
 
@@ -664,7 +664,7 @@
 int MAX77654::GetnENFallingInterruptMask(intm_t* intm)
 {
     int ret;
-    reg_intm_glbl0_t reg_intm_glbl0;
+    reg_intm_glbl0_t reg_intm_glbl0 = {0};
 
     ret = read_register(INTM_GLBL0, (uint8_t *)&(reg_intm_glbl0));
     if (ret != MAX77654_NO_ERROR) {
@@ -678,7 +678,7 @@
 
 int MAX77654::SetGPI0RisingInterruptMask(intm_t intm)
 {
-	reg_intm_glbl0_t reg_intm_glbl0;
+	reg_intm_glbl0_t reg_intm_glbl0 = {0};
 
     SET_BIT_FIELD(INTM_GLBL0, reg_intm_glbl0, reg_intm_glbl0.bits.gpi0_rm, intm);
 
@@ -688,7 +688,7 @@
 int MAX77654::GetGPI0RisingInterruptMask(intm_t* intm)
 {
     int ret;
-    reg_intm_glbl0_t reg_intm_glbl0;
+    reg_intm_glbl0_t reg_intm_glbl0 = {0};
 
     ret = read_register(INTM_GLBL0, (uint8_t *)&(reg_intm_glbl0));
     if (ret != MAX77654_NO_ERROR) {
@@ -702,7 +702,7 @@
 
 int MAX77654::SetGPI0FallingInterruptMask(intm_t intm)
 {
-	reg_intm_glbl0_t reg_intm_glbl0;
+	reg_intm_glbl0_t reg_intm_glbl0 = {0};
 
     SET_BIT_FIELD(INTM_GLBL0, reg_intm_glbl0, reg_intm_glbl0.bits.gpi0_fm, intm);
 
@@ -712,7 +712,7 @@
 int MAX77654::GetGPI0FallingInterruptMask(intm_t* intm)
 {
     int ret;
-    reg_intm_glbl0_t reg_intm_glbl0;
+    reg_intm_glbl0_t reg_intm_glbl0 = {0};
 
     ret = read_register(INTM_GLBL0, (uint8_t *)&(reg_intm_glbl0));
     if (ret != MAX77654_NO_ERROR) {
@@ -726,7 +726,7 @@
 
 int MAX77654::SetnENInternalPullupResistor(pu_dis_t pu_dis)
 {
-	reg_cnfg_glbl_t reg_cnfg_glbl;
+	reg_cnfg_glbl_t reg_cnfg_glbl = {0};
 
     SET_BIT_FIELD(CNFG_GLBL, reg_cnfg_glbl, reg_cnfg_glbl.bits.pu_dis, pu_dis);
 
@@ -736,7 +736,7 @@
 int MAX77654::GetnENInternalPullupResistor(pu_dis_t* pu_dis)
 {
     int ret;
-    reg_cnfg_glbl_t reg_cnfg_glbl;
+    reg_cnfg_glbl_t reg_cnfg_glbl = {0};
 
     ret = read_register(CNFG_GLBL, (uint8_t *)&(reg_cnfg_glbl));
     if (ret != MAX77654_NO_ERROR) {
@@ -750,7 +750,7 @@
 
 int MAX77654::SetManualResetTime(t_mrst_t t_mrst)
 {
-	reg_cnfg_glbl_t reg_cnfg_glbl;
+	reg_cnfg_glbl_t reg_cnfg_glbl = {0};
 
     SET_BIT_FIELD(CNFG_GLBL, reg_cnfg_glbl, reg_cnfg_glbl.bits.t_mrst, t_mrst);
 
@@ -760,7 +760,7 @@
 int MAX77654::GetManualResetTime(t_mrst_t* t_mrst)
 {
     int ret;
-    reg_cnfg_glbl_t reg_cnfg_glbl;
+    reg_cnfg_glbl_t reg_cnfg_glbl = {0};
 
     ret = read_register(CNFG_GLBL, (uint8_t *)&(reg_cnfg_glbl));
     if (ret != MAX77654_NO_ERROR) {
@@ -774,7 +774,7 @@
 
 int MAX77654::SetMainBiasLowerPowerModeReq(sbia_lpm_t sbia_lpm)
 {
-	reg_cnfg_glbl_t reg_cnfg_glbl;
+	reg_cnfg_glbl_t reg_cnfg_glbl = {0};
 
     SET_BIT_FIELD(CNFG_GLBL, reg_cnfg_glbl, reg_cnfg_glbl.bits.sbia_lpm, sbia_lpm);
 
@@ -784,7 +784,7 @@
 int MAX77654::GetMainBiasLowerPowerModeReq(sbia_lpm_t* sbia_lpm)
 {
     int ret;
-    reg_cnfg_glbl_t reg_cnfg_glbl;
+    reg_cnfg_glbl_t reg_cnfg_glbl = {0};
 
     ret = read_register(CNFG_GLBL, (uint8_t *)&(reg_cnfg_glbl));
     if (ret != MAX77654_NO_ERROR) {
@@ -798,7 +798,7 @@
 
 int MAX77654::SetMainBiasEnableReq(sbia_en_t sbia_en)
 {
-	reg_cnfg_glbl_t reg_cnfg_glbl;
+	reg_cnfg_glbl_t reg_cnfg_glbl = {0};
 
     SET_BIT_FIELD(CNFG_GLBL, reg_cnfg_glbl, reg_cnfg_glbl.bits.sbia_en, sbia_en);
 
@@ -808,7 +808,7 @@
 int MAX77654::GetMainBiasEnableReq(sbia_en_t* sbia_en)
 {
     int ret;
-    reg_cnfg_glbl_t reg_cnfg_glbl;
+    reg_cnfg_glbl_t reg_cnfg_glbl = {0};
 
     ret = read_register(CNFG_GLBL, (uint8_t *)&(reg_cnfg_glbl));
     if (ret != MAX77654_NO_ERROR) {
@@ -822,7 +822,7 @@
 
 int MAX77654::SetnEnInputMode(nen_mode_t nen_mode)
 {
-	reg_cnfg_glbl_t reg_cnfg_glbl;
+	reg_cnfg_glbl_t reg_cnfg_glbl = {0};
 
     SET_BIT_FIELD(CNFG_GLBL, reg_cnfg_glbl, reg_cnfg_glbl.bits.nen_mode, nen_mode);
 
@@ -832,7 +832,7 @@
 int MAX77654::GetnEnInputMode(nen_mode_t* nen_mode)
 {
     int ret;
-    reg_cnfg_glbl_t reg_cnfg_glbl;
+    reg_cnfg_glbl_t reg_cnfg_glbl = {0};
 
     ret = read_register(CNFG_GLBL, (uint8_t *)&(reg_cnfg_glbl));
     if (ret != MAX77654_NO_ERROR) {
@@ -846,7 +846,7 @@
 
 int MAX77654::SetDebounceTimerEnable(dben_nen_t dben_nen)
 {
-	reg_cnfg_glbl_t reg_cnfg_glbl;
+	reg_cnfg_glbl_t reg_cnfg_glbl = {0};
 
     SET_BIT_FIELD(CNFG_GLBL, reg_cnfg_glbl, reg_cnfg_glbl.bits.dben_nen, dben_nen);
 
@@ -856,7 +856,7 @@
 int MAX77654::GetDebounceTimerEnable(dben_nen_t* dben_nen)
 {
     int ret;
-    reg_cnfg_glbl_t reg_cnfg_glbl;
+    reg_cnfg_glbl_t reg_cnfg_glbl = {0};
 
     ret = read_register(CNFG_GLBL, (uint8_t *)&(reg_cnfg_glbl));
     if (ret != MAX77654_NO_ERROR) {
@@ -870,7 +870,7 @@
 
 int MAX77654::SetSoftwareResetFunctions(sft_ctrl_t sft_ctrl)
 {
-	reg_cnfg_glbl_t reg_cnfg_glbl;
+	reg_cnfg_glbl_t reg_cnfg_glbl = {0};
 
     SET_BIT_FIELD(CNFG_GLBL, reg_cnfg_glbl, reg_cnfg_glbl.bits.sft_ctrl, sft_ctrl);
 
@@ -880,7 +880,7 @@
 int MAX77654::GetSoftwareResetFunctions(sft_ctrl_t* sft_ctrl)
 {
     int ret;
-    reg_cnfg_glbl_t reg_cnfg_glbl;
+    reg_cnfg_glbl_t reg_cnfg_glbl = {0};
 
     ret = read_register(CNFG_GLBL, (uint8_t *)&(reg_cnfg_glbl));
     if (ret != MAX77654_NO_ERROR) {
@@ -895,15 +895,15 @@
 int MAX77654::SetAlternateModeEnable(uint8_t channel, alt_gpio_t alt_gpio)
 {
     if (channel == 0) {
-    	reg_cnfg_gpio0_t reg_cnfg_gpio0;
+    	reg_cnfg_gpio0_t reg_cnfg_gpio0 = {0};
         SET_BIT_FIELD(CNFG_GPIO0, reg_cnfg_gpio0, reg_cnfg_gpio0.bits.alt_gpio0, alt_gpio);
     }
     else if (channel == 1) {
-    	reg_cnfg_gpio1_t reg_cnfg_gpio1;
+    	reg_cnfg_gpio1_t reg_cnfg_gpio1 = {0};
         SET_BIT_FIELD(CNFG_GPIO1, reg_cnfg_gpio1, reg_cnfg_gpio1.bits.alt_gpio1, alt_gpio);
     }
     else if (channel == 2) {
-    	reg_cnfg_gpio2_t reg_cnfg_gpio2;
+    	reg_cnfg_gpio2_t reg_cnfg_gpio2 = {0};
         SET_BIT_FIELD(CNFG_GPIO2, reg_cnfg_gpio2, reg_cnfg_gpio2.bits.alt_gpio2, alt_gpio);
     }
     else {
@@ -918,7 +918,7 @@
     int ret;
 
     if (channel == 0) {
-    	reg_cnfg_gpio0_t reg_cnfg_gpio0;
+    	reg_cnfg_gpio0_t reg_cnfg_gpio0 = {0};
         ret = read_register(CNFG_GPIO0, (uint8_t *)&(reg_cnfg_gpio0));
         if (ret != MAX77654_NO_ERROR) {
             return ret;
@@ -927,7 +927,7 @@
         *alt_gpio = (alt_gpio_t)reg_cnfg_gpio0.bits.alt_gpio0;
     }
     else if (channel == 1) {
-    	reg_cnfg_gpio1_t reg_cnfg_gpio1;
+    	reg_cnfg_gpio1_t reg_cnfg_gpio1 = {0};
         ret = read_register(CNFG_GPIO1, (uint8_t *)&(reg_cnfg_gpio1));
         if (ret != MAX77654_NO_ERROR) {
             return ret;
@@ -936,7 +936,7 @@
         *alt_gpio = (alt_gpio_t)reg_cnfg_gpio1.bits.alt_gpio1;
     }
     else if (channel == 2) {
-    	reg_cnfg_gpio2_t reg_cnfg_gpio2;
+    	reg_cnfg_gpio2_t reg_cnfg_gpio2 = {0};
         ret = read_register(CNFG_GPIO2, (uint8_t *)&(reg_cnfg_gpio2));
         if (ret != MAX77654_NO_ERROR) {
             return ret;
@@ -954,15 +954,15 @@
 int MAX77654::SetGPIDebounceTimerEnable(uint8_t channel, dben_gpi_t dben_gpi)
 {
     if (channel == 0) {
-    	reg_cnfg_gpio0_t reg_cnfg_gpio0;
+    	reg_cnfg_gpio0_t reg_cnfg_gpio0 = {0};
         SET_BIT_FIELD(CNFG_GPIO0, reg_cnfg_gpio0, reg_cnfg_gpio0.bits.dben_gpi, dben_gpi);
     }
     else if (channel == 1) {
-    	reg_cnfg_gpio1_t reg_cnfg_gpio1;
+    	reg_cnfg_gpio1_t reg_cnfg_gpio1 = {0};
         SET_BIT_FIELD(CNFG_GPIO1, reg_cnfg_gpio1, reg_cnfg_gpio1.bits.dben_gpi, dben_gpi);
     }
     else if (channel == 2) {
-    	reg_cnfg_gpio2_t reg_cnfg_gpio2;
+    	reg_cnfg_gpio2_t reg_cnfg_gpio2 = {0};
         SET_BIT_FIELD(CNFG_GPIO2, reg_cnfg_gpio2, reg_cnfg_gpio2.bits.dben_gpi, dben_gpi);
     }
     else {
@@ -977,7 +977,7 @@
     int ret;
 
     if (channel == 0) {
-        reg_cnfg_gpio0_t reg_cnfg_gpio0;
+        reg_cnfg_gpio0_t reg_cnfg_gpio0 = {0};
         ret = read_register(CNFG_GPIO0, (uint8_t *)&(reg_cnfg_gpio0));
         if (ret != MAX77654_NO_ERROR) {
             return ret;
@@ -986,7 +986,7 @@
         *dben_gpi = (dben_gpi_t)reg_cnfg_gpio0.bits.dben_gpi;
     }
     else if (channel == 1) {
-        reg_cnfg_gpio1_t reg_cnfg_gpio1;
+        reg_cnfg_gpio1_t reg_cnfg_gpio1 = {0};
         ret = read_register(CNFG_GPIO1, (uint8_t *)&(reg_cnfg_gpio1));
         if (ret != MAX77654_NO_ERROR) {
             return ret;
@@ -995,7 +995,7 @@
         *dben_gpi = (dben_gpi_t)reg_cnfg_gpio1.bits.dben_gpi;
     }
     else if (channel == 2) {
-        reg_cnfg_gpio2_t reg_cnfg_gpio2;
+        reg_cnfg_gpio2_t reg_cnfg_gpio2 = {0};
         ret = read_register(CNFG_GPIO2, (uint8_t *)&(reg_cnfg_gpio2));
         if (ret != MAX77654_NO_ERROR) {
             return ret;
@@ -1014,15 +1014,15 @@
 {
 
     if (channel == 0) {
-    	reg_cnfg_gpio0_t reg_cnfg_gpio0;
+    	reg_cnfg_gpio0_t reg_cnfg_gpio0 = {0};
         SET_BIT_FIELD(CNFG_GPIO0, reg_cnfg_gpio0, reg_cnfg_gpio0.bits.gpo_do, gpo_do);
     }
     else if (channel == 1) {
-    	reg_cnfg_gpio1_t reg_cnfg_gpio1;
+    	reg_cnfg_gpio1_t reg_cnfg_gpio1 = {0};
         SET_BIT_FIELD(CNFG_GPIO1, reg_cnfg_gpio1, reg_cnfg_gpio1.bits.gpo_do, gpo_do);
     }
     else if (channel == 2) {
-    	reg_cnfg_gpio2_t reg_cnfg_gpio2;
+    	reg_cnfg_gpio2_t reg_cnfg_gpio2 = {0};
         SET_BIT_FIELD(CNFG_GPIO2, reg_cnfg_gpio2, reg_cnfg_gpio2.bits.gpo_do, gpo_do);
     }
     else {
@@ -1037,7 +1037,7 @@
     int ret;
 
     if (channel == 0) {
-    	reg_cnfg_gpio0_t reg_cnfg_gpio0;
+    	reg_cnfg_gpio0_t reg_cnfg_gpio0 = {0};
         ret = read_register(CNFG_GPIO0, (uint8_t *)&(reg_cnfg_gpio0));
         if (ret != MAX77654_NO_ERROR) {
             return ret;
@@ -1046,7 +1046,7 @@
         *gpo_do = (gpo_do_t)reg_cnfg_gpio0.bits.gpo_do;
     }
     else if (channel == 1) {
-    	reg_cnfg_gpio1_t reg_cnfg_gpio1;
+    	reg_cnfg_gpio1_t reg_cnfg_gpio1 = {0};
         ret = read_register(CNFG_GPIO1, (uint8_t *)&(reg_cnfg_gpio1));
         if (ret != MAX77654_NO_ERROR) {
             return ret;
@@ -1055,7 +1055,7 @@
         *gpo_do = (gpo_do_t)reg_cnfg_gpio1.bits.gpo_do;
     }
     else if (channel == 2) {
-    	reg_cnfg_gpio2_t reg_cnfg_gpio2;
+    	reg_cnfg_gpio2_t reg_cnfg_gpio2 = {0};
         ret = read_register(CNFG_GPIO2, (uint8_t *)&(reg_cnfg_gpio2));
         if (ret != MAX77654_NO_ERROR) {
             return ret;
@@ -1073,15 +1073,15 @@
 int MAX77654::SetGPODriveType(uint8_t channel, gpo_drv_t gpo_drv)
 {
     if (channel == 0) {
-    	reg_cnfg_gpio0_t reg_cnfg_gpio0;
+    	reg_cnfg_gpio0_t reg_cnfg_gpio0 = {0};
         SET_BIT_FIELD(CNFG_GPIO0, reg_cnfg_gpio0, reg_cnfg_gpio0.bits.gpo_drv, gpo_drv);
     }
     else if (channel == 1) {
-    	reg_cnfg_gpio1_t reg_cnfg_gpio1;
+    	reg_cnfg_gpio1_t reg_cnfg_gpio1 = {0};
         SET_BIT_FIELD(CNFG_GPIO1, reg_cnfg_gpio1, reg_cnfg_gpio1.bits.gpo_drv, gpo_drv);
     }
     else if (channel == 2) {
-    	reg_cnfg_gpio2_t reg_cnfg_gpio2;
+    	reg_cnfg_gpio2_t reg_cnfg_gpio2 = {0};
         SET_BIT_FIELD(CNFG_GPIO2, reg_cnfg_gpio2, reg_cnfg_gpio2.bits.gpo_drv, gpo_drv);
     }
     else {
@@ -1096,7 +1096,7 @@
     int ret;
 
     if (channel == 0) {
-    	reg_cnfg_gpio0_t reg_cnfg_gpio0;
+    	reg_cnfg_gpio0_t reg_cnfg_gpio0 = {0};
         ret = read_register(CNFG_GPIO0, (uint8_t *)&(reg_cnfg_gpio0));
         if (ret != MAX77654_NO_ERROR) {
             return ret;
@@ -1105,7 +1105,7 @@
         *gpo_drv = (gpo_drv_t)reg_cnfg_gpio0.bits.gpo_drv;
     }
     else if (channel == 1) {
-    	reg_cnfg_gpio1_t reg_cnfg_gpio1;
+    	reg_cnfg_gpio1_t reg_cnfg_gpio1 = {0};
         ret = read_register(CNFG_GPIO1, (uint8_t *)&(reg_cnfg_gpio1));
         if (ret != MAX77654_NO_ERROR) {
             return ret;
@@ -1114,7 +1114,7 @@
         *gpo_drv = (gpo_drv_t)reg_cnfg_gpio1.bits.gpo_drv;
     }
     else if (channel == 2) {
-    	reg_cnfg_gpio2_t reg_cnfg_gpio2;
+    	reg_cnfg_gpio2_t reg_cnfg_gpio2 = {0};
         ret = read_register(CNFG_GPIO2, (uint8_t *)&(reg_cnfg_gpio2));
         if (ret != MAX77654_NO_ERROR) {
             return ret;
@@ -1132,15 +1132,15 @@
 int MAX77654::SetGPIOInputValue(uint8_t channel, gpo_di_t gpo_di)
 {
     if (channel == 0) {
-    	reg_cnfg_gpio0_t reg_cnfg_gpio0;
+    	reg_cnfg_gpio0_t reg_cnfg_gpio0 = {0};
         SET_BIT_FIELD(CNFG_GPIO0, reg_cnfg_gpio0, reg_cnfg_gpio0.bits.gpo_di, gpo_di);
     }
     else if (channel == 1) {
-    	reg_cnfg_gpio1_t reg_cnfg_gpio1;
+    	reg_cnfg_gpio1_t reg_cnfg_gpio1 = {0};
         SET_BIT_FIELD(CNFG_GPIO1, reg_cnfg_gpio1, reg_cnfg_gpio1.bits.gpo_di, gpo_di);
     }
     else if (channel == 2) {
-    	reg_cnfg_gpio2_t reg_cnfg_gpio2;
+    	reg_cnfg_gpio2_t reg_cnfg_gpio2 = {0};
         SET_BIT_FIELD(CNFG_GPIO2, reg_cnfg_gpio2, reg_cnfg_gpio2.bits.gpo_di, gpo_di);
     }
     else {
@@ -1155,7 +1155,7 @@
     int ret;
 
     if (channel == 0) {
-    	reg_cnfg_gpio0_t reg_cnfg_gpio0;
+    	reg_cnfg_gpio0_t reg_cnfg_gpio0 = {0};
         ret = read_register(CNFG_GPIO0, (uint8_t *)&(reg_cnfg_gpio0));
         if (ret != MAX77654_NO_ERROR) {
             return ret;
@@ -1164,7 +1164,7 @@
         *gpo_di = (gpo_di_t)reg_cnfg_gpio0.bits.gpo_di;
     }
     else if (channel == 1) {
-    	reg_cnfg_gpio1_t reg_cnfg_gpio1;
+    	reg_cnfg_gpio1_t reg_cnfg_gpio1 = {0};
         ret = read_register(CNFG_GPIO1, (uint8_t *)&(reg_cnfg_gpio1));
         if (ret != MAX77654_NO_ERROR) {
             return ret;
@@ -1173,7 +1173,7 @@
         *gpo_di = (gpo_di_t)reg_cnfg_gpio1.bits.gpo_di;
     }
     else if (channel == 2) {
-    	reg_cnfg_gpio2_t reg_cnfg_gpio2;
+    	reg_cnfg_gpio2_t reg_cnfg_gpio2 = {0};
         ret = read_register(CNFG_GPIO2, (uint8_t *)&(reg_cnfg_gpio2));
         if (ret != MAX77654_NO_ERROR) {
             return ret;
@@ -1191,15 +1191,15 @@
 int MAX77654::SetGPIODirection(uint8_t channel, gpo_dir_t gpo_dir)
 {
     if (channel == 0) {
-    	reg_cnfg_gpio0_t reg_cnfg_gpio0;
+    	reg_cnfg_gpio0_t reg_cnfg_gpio0 = {0};
         SET_BIT_FIELD(CNFG_GPIO0, reg_cnfg_gpio0, reg_cnfg_gpio0.bits.gpo_dir, gpo_dir);
     }
     else if (channel == 1) {
-    	reg_cnfg_gpio1_t reg_cnfg_gpio1;
+    	reg_cnfg_gpio1_t reg_cnfg_gpio1 = {0};
         SET_BIT_FIELD(CNFG_GPIO1, reg_cnfg_gpio1, reg_cnfg_gpio1.bits.gpo_dir, gpo_dir);
     }
     else if (channel == 2) {
-    	reg_cnfg_gpio2_t reg_cnfg_gpio2;
+    	reg_cnfg_gpio2_t reg_cnfg_gpio2 = {0};
         SET_BIT_FIELD(CNFG_GPIO2, reg_cnfg_gpio2, reg_cnfg_gpio2.bits.gpo_dir, gpo_dir);
     }
     else {
@@ -1214,7 +1214,7 @@
     int ret;
     
     if (channel == 0) {
-    	reg_cnfg_gpio0_t reg_cnfg_gpio0;
+    	reg_cnfg_gpio0_t reg_cnfg_gpio0 = {0};
         ret = read_register(CNFG_GPIO0, (uint8_t *)&(reg_cnfg_gpio0));
         if (ret != MAX77654_NO_ERROR) {
             return ret;
@@ -1223,7 +1223,7 @@
         *gpo_dir = (gpo_dir_t)reg_cnfg_gpio0.bits.gpo_dir;
     }
     else if (channel == 1) {
-    	reg_cnfg_gpio1_t reg_cnfg_gpio1;
+    	reg_cnfg_gpio1_t reg_cnfg_gpio1 = {0};
         ret = read_register(CNFG_GPIO1, (uint8_t *)&(reg_cnfg_gpio1));
         if (ret != MAX77654_NO_ERROR) {
             return ret;
@@ -1232,7 +1232,7 @@
         *gpo_dir = (gpo_dir_t)reg_cnfg_gpio1.bits.gpo_dir;
     }
     else if (channel == 2) {
-    	reg_cnfg_gpio2_t reg_cnfg_gpio2;
+    	reg_cnfg_gpio2_t reg_cnfg_gpio2 = {0};
         ret = read_register(CNFG_GPIO2, (uint8_t *)&(reg_cnfg_gpio2));
         if (ret != MAX77654_NO_ERROR) {
             return ret;
@@ -1261,7 +1261,7 @@
 
 int MAX77654::SetWatchdogTimerPeriod(wdt_per_t wdt_per)
 {
-	reg_cnfg_wdt_t reg_cnfg_wdt;
+	reg_cnfg_wdt_t reg_cnfg_wdt = {0};
 
     SET_BIT_FIELD(CNFG_WDT, reg_cnfg_wdt, reg_cnfg_wdt.bits.wdt_per, wdt_per);
 
@@ -1271,7 +1271,7 @@
 int MAX77654::GetWatchdogTimerPeriod(wdt_per_t *wdt_per)
 {
     int ret;
-    reg_cnfg_wdt_t reg_cnfg_wdt;
+    reg_cnfg_wdt_t reg_cnfg_wdt = {0};
 
     ret = read_register(CNFG_WDT, (uint8_t *)&(reg_cnfg_wdt));
     if (ret != MAX77654_NO_ERROR) {
@@ -1285,7 +1285,7 @@
 
 int MAX77654::SetWatchdogTimerExpiredAction(wdt_mode_t wdt_mode)
 {
-	reg_cnfg_wdt_t reg_cnfg_wdt;
+	reg_cnfg_wdt_t reg_cnfg_wdt = {0};
 
     SET_BIT_FIELD(CNFG_WDT, reg_cnfg_wdt, reg_cnfg_wdt.bits.wdt_mode, wdt_mode);
 
@@ -1295,7 +1295,7 @@
 int MAX77654::GetWatchdogTimerExpiredAction(wdt_mode_t *wdt_mode)
 {
     int ret;
-    reg_cnfg_wdt_t reg_cnfg_wdt;
+    reg_cnfg_wdt_t reg_cnfg_wdt = {0};
 
     ret = read_register(CNFG_WDT, (uint8_t *)&(reg_cnfg_wdt));
     if (ret != MAX77654_NO_ERROR) {
@@ -1309,7 +1309,7 @@
 
 int MAX77654::SetWatchdogTimerClearControl(wdt_clr_t wdt_clr)
 {
-	reg_cnfg_wdt_t reg_cnfg_wdt;
+	reg_cnfg_wdt_t reg_cnfg_wdt = {0};
 
     SET_BIT_FIELD(CNFG_WDT, reg_cnfg_wdt, reg_cnfg_wdt.bits.wdt_clr, wdt_clr);
 
@@ -1319,7 +1319,7 @@
 int MAX77654::GetWatchdogTimerClearControl(wdt_clr_t *wdt_clr)
 {
     int ret;
-    reg_cnfg_wdt_t reg_cnfg_wdt;
+    reg_cnfg_wdt_t reg_cnfg_wdt = {0};
 
     ret = read_register(CNFG_WDT, (uint8_t *)&(reg_cnfg_wdt));
     if (ret != MAX77654_NO_ERROR) {
@@ -1333,7 +1333,7 @@
 
 int MAX77654::SetWatchdogTimerEnable(wdt_en_t wdt_en)
 {
-	reg_cnfg_wdt_t reg_cnfg_wdt;
+	reg_cnfg_wdt_t reg_cnfg_wdt = {0};
 
     SET_BIT_FIELD(CNFG_WDT, reg_cnfg_wdt, reg_cnfg_wdt.bits.wdt_en, wdt_en);
 
@@ -1343,7 +1343,7 @@
 int MAX77654::GetWatchdogTimerEnable(wdt_en_t *wdt_en)
 {
     int ret;
-    reg_cnfg_wdt_t reg_cnfg_wdt;
+    reg_cnfg_wdt_t reg_cnfg_wdt = {0};
 
     ret = read_register(CNFG_WDT, (uint8_t *)&(reg_cnfg_wdt));
     if (ret != MAX77654_NO_ERROR) {
@@ -1357,7 +1357,7 @@
 
 int MAX77654::SetFactorySetSafetyBit(wdt_lock_t wdt_lock)
 {
-	reg_cnfg_wdt_t reg_cnfg_wdt;
+	reg_cnfg_wdt_t reg_cnfg_wdt = {0};
 
     SET_BIT_FIELD(CNFG_WDT, reg_cnfg_wdt, reg_cnfg_wdt.bits.wdt_lock, wdt_lock);
 
@@ -1367,7 +1367,7 @@
 int MAX77654::GetFactorySetSafetyBit(wdt_lock_t *wdt_lock)
 {
     int ret;
-    reg_cnfg_wdt_t reg_cnfg_wdt;
+    reg_cnfg_wdt_t reg_cnfg_wdt = {0};
 
     ret = read_register(CNFG_WDT, (uint8_t *)&(reg_cnfg_wdt));
     if (ret != MAX77654_NO_ERROR) {
@@ -1382,7 +1382,7 @@
 int MAX77654::GetMinimumVCHGINVoltageLoopStatus(stat_t *stat)
 {
     int ret;
-    reg_stat_chg_a_t reg_stat_chg_a;
+    reg_stat_chg_a_t reg_stat_chg_a = {0};
 
     ret = read_register(STAT_CHG_A, (uint8_t *)&(reg_stat_chg_a));
     if (ret != MAX77654_NO_ERROR) {
@@ -1397,7 +1397,7 @@
 int MAX77654::GetCHGINCurrentLimitLoopStatus(stat_t *stat)
 {
     int ret;
-    reg_stat_chg_a_t reg_stat_chg_a;
+    reg_stat_chg_a_t reg_stat_chg_a = {0};
 
     ret = read_register(STAT_CHG_A, (uint8_t *)&(reg_stat_chg_a));
     if (ret != MAX77654_NO_ERROR) {
@@ -1412,7 +1412,7 @@
 int MAX77654::GetMinimumSYSVoltageLoopStatus(stat_t *stat)
 {
     int ret;
-    reg_stat_chg_a_t reg_stat_chg_a;
+    reg_stat_chg_a_t reg_stat_chg_a = {0};
 
     ret = read_register(STAT_CHG_A, (uint8_t *)&(reg_stat_chg_a));
     if (ret != MAX77654_NO_ERROR) {
@@ -1427,7 +1427,7 @@
 int MAX77654::GetMaximumJunctionTempLoopStatus(stat_t *stat)
 {
     int ret;
-    reg_stat_chg_a_t reg_stat_chg_a;
+    reg_stat_chg_a_t reg_stat_chg_a = {0};
 
     ret = read_register(STAT_CHG_A, (uint8_t *)&(reg_stat_chg_a));
     if (ret != MAX77654_NO_ERROR) {
@@ -1442,7 +1442,7 @@
 int MAX77654::GetBatteryTemperatureDetails(thm_dtls_t *thm_dtls)
 {
     int ret;
-    reg_stat_chg_a_t reg_stat_chg_a;
+    reg_stat_chg_a_t reg_stat_chg_a = {0};
 
     ret = read_register(STAT_CHG_A, (uint8_t *)&(reg_stat_chg_a));
     if (ret != MAX77654_NO_ERROR) {
@@ -1457,7 +1457,7 @@
 int MAX77654::GetChargerDetails(chg_dtls_t *chg_dtls)
 {
     int ret;
-    reg_stat_chg_b_t reg_stat_chg_b;
+    reg_stat_chg_b_t reg_stat_chg_b = {0};
 
     ret = read_register(STAT_CHG_B, (uint8_t *)&(reg_stat_chg_b));
     if (ret != MAX77654_NO_ERROR) {
@@ -1472,7 +1472,7 @@
 int MAX77654::GetCHGINStatusDetails(chgin_dtls_t *chgin_dtls)
 {
     int ret;
-    reg_stat_chg_b_t reg_stat_chg_b;
+    reg_stat_chg_b_t reg_stat_chg_b = {0};
 
     ret = read_register(STAT_CHG_B, (uint8_t *)&(reg_stat_chg_b));
     if (ret != MAX77654_NO_ERROR) {
@@ -1487,7 +1487,7 @@
 int MAX77654::GetQuickChargerStatus(chg_t *chg)
 {
     int ret;
-    reg_stat_chg_b_t reg_stat_chg_b;
+    reg_stat_chg_b_t reg_stat_chg_b = {0};
 
     ret = read_register(STAT_CHG_B, (uint8_t *)&(reg_stat_chg_b));
     if (ret != MAX77654_NO_ERROR) {
@@ -1502,7 +1502,7 @@
 int MAX77654::GetTimeSuspendedIndicator(time_sus_t *time_sus)
 {
     int ret;
-    reg_stat_chg_b_t reg_stat_chg_b;
+    reg_stat_chg_b_t reg_stat_chg_b = {0};
 
     ret = read_register(STAT_CHG_B, (uint8_t *)&(reg_stat_chg_b));
     if (ret != MAX77654_NO_ERROR) {
@@ -1516,7 +1516,7 @@
 
 int MAX77654::SetSYSCONFIGMBit(intm_t intm)
 {
-	reg_int_m_chg_t reg_int_m_chg;
+	reg_int_m_chg_t reg_int_m_chg = {0};
 
     SET_BIT_FIELD(INT_M_CHG, reg_int_m_chg, reg_int_m_chg.bits.sys_cnfg_m, intm);
 
@@ -1526,7 +1526,7 @@
 int MAX77654::GetSYSCONFIGMBit(intm_t *intm)
 {
     int ret;
-    reg_int_m_chg_t reg_int_m_chg;
+    reg_int_m_chg_t reg_int_m_chg = {0};
 
     ret = read_register(INT_M_CHG, (uint8_t *)&(reg_int_m_chg));
     if (ret != MAX77654_NO_ERROR) {
@@ -1540,7 +1540,7 @@
 
 int MAX77654::SetSYSCTRLMBit(intm_t intm)
 {
-	reg_int_m_chg_t reg_int_m_chg;
+	reg_int_m_chg_t reg_int_m_chg = {0};
 
     SET_BIT_FIELD(INT_M_CHG, reg_int_m_chg, reg_int_m_chg.bits.sys_ctrl_m, intm);
 
@@ -1550,7 +1550,7 @@
 int MAX77654::GetSYSCTRLMBit(intm_t *intm)
 {
     int ret;
-    reg_int_m_chg_t reg_int_m_chg;
+    reg_int_m_chg_t reg_int_m_chg = {0};
 
     ret = read_register(INT_M_CHG, (uint8_t *)&(reg_int_m_chg));
     if (ret != MAX77654_NO_ERROR) {
@@ -1564,7 +1564,7 @@
 
 int MAX77654::SetCHGINCTRLMBit(intm_t intm)
 {
-	reg_int_m_chg_t reg_int_m_chg;
+	reg_int_m_chg_t reg_int_m_chg = {0};
 
     SET_BIT_FIELD(INT_M_CHG, reg_int_m_chg, reg_int_m_chg.bits.chgin_ctrl_m, intm);
 
@@ -1574,7 +1574,7 @@
 int MAX77654::GetCHGINCTRLMBit(intm_t *intm)
 { 
     int ret;
-    reg_int_m_chg_t reg_int_m_chg;
+    reg_int_m_chg_t reg_int_m_chg = {0};
 
     ret = read_register(INT_M_CHG, (uint8_t *)&(reg_int_m_chg));
     if (ret != MAX77654_NO_ERROR) {
@@ -1588,7 +1588,7 @@
 
 int MAX77654::SetTJREGMBit(intm_t intm)
 {
-	reg_int_m_chg_t reg_int_m_chg;
+	reg_int_m_chg_t reg_int_m_chg = {0};
 
     SET_BIT_FIELD(INT_M_CHG, reg_int_m_chg, reg_int_m_chg.bits.tj_reg_m, intm);
 
@@ -1598,7 +1598,7 @@
 int MAX77654::GetTJREGMBit(intm_t *intm)
 {
     int ret;
-    reg_int_m_chg_t reg_int_m_chg;
+    reg_int_m_chg_t reg_int_m_chg = {0};
 
     ret = read_register(INT_M_CHG, (uint8_t *)&(reg_int_m_chg));
     if (ret != MAX77654_NO_ERROR) {
@@ -1612,7 +1612,7 @@
 
 int MAX77654::SetCHGINMBit(intm_t intm)
 {
-	reg_int_m_chg_t reg_int_m_chg;
+	reg_int_m_chg_t reg_int_m_chg = {0};
 
     SET_BIT_FIELD(INT_M_CHG, reg_int_m_chg, reg_int_m_chg.bits.chgin_m, intm);
 
@@ -1622,7 +1622,7 @@
 int MAX77654::GetCHGINMBit(intm_t *intm)
 {
     int ret;
-    reg_int_m_chg_t reg_int_m_chg;
+    reg_int_m_chg_t reg_int_m_chg = {0};
 
     ret = read_register(INT_M_CHG, (uint8_t *)&(reg_int_m_chg));
     if (ret != MAX77654_NO_ERROR) {
@@ -1636,7 +1636,7 @@
 
 int MAX77654::SetCHGMBit(intm_t intm)
 {
-	reg_int_m_chg_t reg_int_m_chg;
+	reg_int_m_chg_t reg_int_m_chg = {0};
 
     SET_BIT_FIELD(INT_M_CHG, reg_int_m_chg, reg_int_m_chg.bits.chg_m, intm);
 
@@ -1646,7 +1646,7 @@
 int MAX77654::GetCHGMBit(intm_t *intm)
 {
     int ret;
-    reg_int_m_chg_t reg_int_m_chg;
+    reg_int_m_chg_t reg_int_m_chg = {0};
 
     ret = read_register(INT_M_CHG, (uint8_t *)&(reg_int_m_chg));
     if (ret != MAX77654_NO_ERROR) {
@@ -1660,7 +1660,7 @@
 
 int MAX77654::SetTHMMBit(intm_t intm)
 {
-	reg_int_m_chg_t reg_int_m_chg;
+	reg_int_m_chg_t reg_int_m_chg = {0};
 
     SET_BIT_FIELD(INT_M_CHG, reg_int_m_chg, reg_int_m_chg.bits.thm_m, intm);
 
@@ -1670,7 +1670,7 @@
 int MAX77654::GetTHMMBit(intm_t *intm)
 {
     int ret;
-    reg_int_m_chg_t reg_int_m_chg;
+    reg_int_m_chg_t reg_int_m_chg = {0};
 
     ret = read_register(INT_M_CHG, (uint8_t *)&(reg_int_m_chg));
     if (ret != MAX77654_NO_ERROR) {
@@ -1684,7 +1684,7 @@
 
 int MAX77654::SetHOTJEITATemperature(thm_hot_t thm_hot)
 {
-	reg_cnfg_chg_a_t reg_cnfg_chg_a;
+	reg_cnfg_chg_a_t reg_cnfg_chg_a = {0};
 
     SET_BIT_FIELD(CNFG_CHG_A, reg_cnfg_chg_a, reg_cnfg_chg_a.bits.thm_hot, thm_hot);
 
@@ -1694,7 +1694,7 @@
 int MAX77654::GetHOTJEITATemperature(thm_hot_t *thm_hot)
 {
     int ret;
-    reg_cnfg_chg_a_t reg_cnfg_chg_a;
+    reg_cnfg_chg_a_t reg_cnfg_chg_a = {0};
 
     ret = read_register(CNFG_CHG_A, (uint8_t *)&(reg_cnfg_chg_a));
     if (ret != MAX77654_NO_ERROR) {
@@ -1708,7 +1708,7 @@
 
 int MAX77654::SetWARMJEITATemperature(thm_warm_t thm_warm)
 {
-	reg_cnfg_chg_a_t reg_cnfg_chg_a;
+	reg_cnfg_chg_a_t reg_cnfg_chg_a = {0};
 
     SET_BIT_FIELD(CNFG_CHG_A, reg_cnfg_chg_a, reg_cnfg_chg_a.bits.thm_warm, thm_warm);
 
@@ -1718,7 +1718,7 @@
 int MAX77654::GetWARMJEITATemperature(thm_warm_t *thm_warm)
 {
     int ret;
-    reg_cnfg_chg_a_t reg_cnfg_chg_a;
+    reg_cnfg_chg_a_t reg_cnfg_chg_a = {0};
 
     ret = read_register(CNFG_CHG_A, (uint8_t *)&(reg_cnfg_chg_a));
     if (ret != MAX77654_NO_ERROR) {
@@ -1732,7 +1732,7 @@
 
 int MAX77654::SetCOOLJEITATemperature(thm_cool_t thm_cool)
 {
-	reg_cnfg_chg_a_t reg_cnfg_chg_a;
+	reg_cnfg_chg_a_t reg_cnfg_chg_a = {0};
 
     SET_BIT_FIELD(CNFG_CHG_A, reg_cnfg_chg_a, reg_cnfg_chg_a.bits.thm_cool, thm_cool);
 
@@ -1742,7 +1742,7 @@
 int MAX77654::GetCOOLJEITATemperature(thm_cool_t *thm_cool)
 {
     int ret;
-    reg_cnfg_chg_a_t reg_cnfg_chg_a;
+    reg_cnfg_chg_a_t reg_cnfg_chg_a = {0};
 
     ret = read_register(CNFG_CHG_A, (uint8_t *)&(reg_cnfg_chg_a));
     if (ret != MAX77654_NO_ERROR) {
@@ -1756,7 +1756,7 @@
 
 int MAX77654::SetCOLDJEITATemperature(thm_cold_t thm_cold)
 {
-	reg_cnfg_chg_a_t reg_cnfg_chg_a;
+	reg_cnfg_chg_a_t reg_cnfg_chg_a = {0};
 
     SET_BIT_FIELD(CNFG_CHG_A, reg_cnfg_chg_a, reg_cnfg_chg_a.bits.thm_cold, thm_cold);
 
@@ -1766,7 +1766,7 @@
 int MAX77654::GetCOLDJEITATemperature(thm_cold_t *thm_cold)
 {
     int ret;
-    reg_cnfg_chg_a_t reg_cnfg_chg_a;
+    reg_cnfg_chg_a_t reg_cnfg_chg_a = {0};
 
     ret = read_register(CNFG_CHG_A, (uint8_t *)&(reg_cnfg_chg_a));
     if (ret != MAX77654_NO_ERROR) {
@@ -1780,7 +1780,7 @@
 
 int MAX77654::SetMinimumCHGINVoltage(vchgin_min_t vchgin_min)
 {
-	reg_cnfg_chg_b_t reg_cnfg_chg_b;
+	reg_cnfg_chg_b_t reg_cnfg_chg_b = {0};
 
     SET_BIT_FIELD(CNFG_CHG_B, reg_cnfg_chg_b, reg_cnfg_chg_b.bits.vchgin_min, vchgin_min);
 
@@ -1790,7 +1790,7 @@
 int MAX77654::GetMinimumCHGINVoltage(vchgin_min_t *vchgin_min)
 {
     int ret;
-    reg_cnfg_chg_b_t reg_cnfg_chg_b;
+    reg_cnfg_chg_b_t reg_cnfg_chg_b = {0};
 
     ret = read_register(CNFG_CHG_B, (uint8_t *)&(reg_cnfg_chg_b));
     if (ret != MAX77654_NO_ERROR) {
@@ -1804,7 +1804,7 @@
 
 int MAX77654::SetCHGINInputCurrentLimit(ichgin_lim_t ichgin_lim)
 {
-	reg_cnfg_chg_b_t reg_cnfg_chg_b;
+	reg_cnfg_chg_b_t reg_cnfg_chg_b = {0};
 
     SET_BIT_FIELD(CNFG_CHG_B, reg_cnfg_chg_b, reg_cnfg_chg_b.bits.ichgin_lim, ichgin_lim);
 
@@ -1814,7 +1814,7 @@
 int MAX77654::GetCHGINInputCurrentLimit(ichgin_lim_t *ichgin_lim)
 {
     int ret;
-    reg_cnfg_chg_b_t reg_cnfg_chg_b;
+    reg_cnfg_chg_b_t reg_cnfg_chg_b = {0};
 
     ret = read_register(CNFG_CHG_B, (uint8_t *)&(reg_cnfg_chg_b));
     if (ret != MAX77654_NO_ERROR) {
@@ -1828,7 +1828,7 @@
 
 int MAX77654::SetPrequalificationChargeCurrent(i_pq_t i_pq)
 {
-	reg_cnfg_chg_b_t reg_cnfg_chg_b;
+	reg_cnfg_chg_b_t reg_cnfg_chg_b = {0};
 
     SET_BIT_FIELD(CNFG_CHG_B, reg_cnfg_chg_b, reg_cnfg_chg_b.bits.i_pq, i_pq);
 
@@ -1838,7 +1838,7 @@
 int MAX77654::GetPrequalificationChargeCurrent(i_pq_t *i_pq)
 {
     int ret;
-    reg_cnfg_chg_b_t reg_cnfg_chg_b;
+    reg_cnfg_chg_b_t reg_cnfg_chg_b = {0};
 
     ret = read_register(CNFG_CHG_B, (uint8_t *)&(reg_cnfg_chg_b));
     if (ret != MAX77654_NO_ERROR) {
@@ -1852,7 +1852,7 @@
 
 int MAX77654::SetBatteryChargerEnable(chg_en_t chg_en)
 {
-	reg_cnfg_chg_b_t reg_cnfg_chg_b;
+	reg_cnfg_chg_b_t reg_cnfg_chg_b = {0};
 
     SET_BIT_FIELD(CNFG_CHG_B, reg_cnfg_chg_b, reg_cnfg_chg_b.bits.chg_en, chg_en);
 
@@ -1862,7 +1862,7 @@
 int MAX77654::GetBatteryChargerEnable(chg_en_t *chg_en)
 {
     int ret;
-    reg_cnfg_chg_b_t reg_cnfg_chg_b;
+    reg_cnfg_chg_b_t reg_cnfg_chg_b = {0};
 
     ret = read_register(CNFG_CHG_B, (uint8_t *)&(reg_cnfg_chg_b));
     if (ret != MAX77654_NO_ERROR) {
@@ -1876,7 +1876,7 @@
 
 int MAX77654::SetBatteryPQVoltageThreshold(chg_pq_t chg_pq)
 {
-	reg_cnfg_chg_c_t reg_cnfg_chg_c;
+	reg_cnfg_chg_c_t reg_cnfg_chg_c = {0};
 
     SET_BIT_FIELD(CNFG_CHG_C, reg_cnfg_chg_c, reg_cnfg_chg_c.bits.chg_pq, chg_pq);
 
@@ -1886,7 +1886,7 @@
 int MAX77654::GetBatteryPQVoltageThreshold(chg_pq_t *chg_pq)
 {
     int ret;
-    reg_cnfg_chg_c_t reg_cnfg_chg_c;
+    reg_cnfg_chg_c_t reg_cnfg_chg_c = {0};
 
     ret = read_register(CNFG_CHG_C, (uint8_t *)&(reg_cnfg_chg_c));
     if (ret != MAX77654_NO_ERROR) {
@@ -1900,7 +1900,7 @@
 
 int MAX77654::SetChargerTerminationCurrent(i_term_t i_term)
 {
-	reg_cnfg_chg_c_t reg_cnfg_chg_c;
+	reg_cnfg_chg_c_t reg_cnfg_chg_c = {0};
 
     SET_BIT_FIELD(CNFG_CHG_C, reg_cnfg_chg_c, reg_cnfg_chg_c.bits.i_term, i_term);
 
@@ -1910,7 +1910,7 @@
 int MAX77654::GetChargerTerminationCurrent(i_term_t *i_term)
 {
     int ret;
-    reg_cnfg_chg_c_t reg_cnfg_chg_c;
+    reg_cnfg_chg_c_t reg_cnfg_chg_c = {0};
 
     ret = read_register(CNFG_CHG_C, (uint8_t *)&(reg_cnfg_chg_c));
     if (ret != MAX77654_NO_ERROR) {
@@ -1924,7 +1924,7 @@
 
 int MAX77654::SetTopOffTimerValue(t_topoff_t t_topoff)
 {
-	reg_cnfg_chg_c_t reg_cnfg_chg_c;
+	reg_cnfg_chg_c_t reg_cnfg_chg_c = {0};
 
     SET_BIT_FIELD(CNFG_CHG_C, reg_cnfg_chg_c, reg_cnfg_chg_c.bits.t_topoff, t_topoff);
 
@@ -1934,7 +1934,7 @@
 int MAX77654::GetTopOffTimerValue(t_topoff_t *t_topoff)
 {
     int ret;
-    reg_cnfg_chg_c_t reg_cnfg_chg_c;
+    reg_cnfg_chg_c_t reg_cnfg_chg_c = {0};
 
     ret = read_register(CNFG_CHG_C, (uint8_t *)&(reg_cnfg_chg_c));
     if (ret != MAX77654_NO_ERROR) {
@@ -1948,7 +1948,7 @@
 
 int MAX77654::SetDieJunctionTemperature(tj_reg_t tj_reg)
 {
-	reg_cnfg_chg_d_t reg_cnfg_chg_d;
+	reg_cnfg_chg_d_t reg_cnfg_chg_d = {0};
 
     SET_BIT_FIELD(CNFG_CHG_D, reg_cnfg_chg_d, reg_cnfg_chg_d.bits.tj_reg, tj_reg);
 
@@ -1958,7 +1958,7 @@
 int MAX77654::GetDieJunctionTemperature(tj_reg_t *tj_reg)
 {
     int ret;
-    reg_cnfg_chg_d_t reg_cnfg_chg_d;
+    reg_cnfg_chg_d_t reg_cnfg_chg_d = {0};
 
     ret = read_register(CNFG_CHG_D, (uint8_t *)&(reg_cnfg_chg_d));
     if (ret != MAX77654_NO_ERROR) {
@@ -1972,7 +1972,7 @@
 
 int MAX77654::SetSystemVoltageRegulation(vsys_reg_t vsys_reg)
 {
-	reg_cnfg_chg_d_t reg_cnfg_chg_d;
+	reg_cnfg_chg_d_t reg_cnfg_chg_d = {0};
 
     SET_BIT_FIELD(CNFG_CHG_D, reg_cnfg_chg_d, reg_cnfg_chg_d.bits.vsys_reg, vsys_reg);
 
@@ -1982,7 +1982,7 @@
 int MAX77654::GetSystemVoltageRegulation(vsys_reg_t *vsys_reg)
 {
     int ret;
-    reg_cnfg_chg_d_t reg_cnfg_chg_d;
+    reg_cnfg_chg_d_t reg_cnfg_chg_d = {0};
 
     ret = read_register(CNFG_CHG_D, (uint8_t *)&(reg_cnfg_chg_d));
     if (ret != MAX77654_NO_ERROR) {
@@ -1996,7 +1996,7 @@
 
 int MAX77654::SetFastChargeCCValue(chg_cc_t chg_cc)
 {
-	reg_cnfg_chg_e_t reg_cnfg_chg_e;
+	reg_cnfg_chg_e_t reg_cnfg_chg_e = {0};
 
     SET_BIT_FIELD(CNFG_CHG_E, reg_cnfg_chg_e, reg_cnfg_chg_e.bits.chg_cc, chg_cc);
 
@@ -2006,7 +2006,7 @@
 int MAX77654::GetFastChargeCCValue(chg_cc_t *chg_cc)
 {
     int ret;
-    reg_cnfg_chg_e_t reg_cnfg_chg_e;
+    reg_cnfg_chg_e_t reg_cnfg_chg_e = {0};
 
     ret = read_register(CNFG_CHG_E, (uint8_t *)&(reg_cnfg_chg_e));
     if (ret != MAX77654_NO_ERROR) {
@@ -2020,7 +2020,7 @@
 
 int MAX77654::SetFastChargSafetyTimer(t_fast_chg_t t_fast_chg)
 {
-	reg_cnfg_chg_e_t reg_cnfg_chg_e;
+	reg_cnfg_chg_e_t reg_cnfg_chg_e = {0};
 
     SET_BIT_FIELD(CNFG_CHG_E, reg_cnfg_chg_e, reg_cnfg_chg_e.bits.t_fast_chg, t_fast_chg);
 
@@ -2030,7 +2030,7 @@
 int MAX77654::GetFastChargSafetyTimer(t_fast_chg_t *t_fast_chg)
 {
     int ret;
-    reg_cnfg_chg_e_t reg_cnfg_chg_e;
+    reg_cnfg_chg_e_t reg_cnfg_chg_e = {0};
 
     ret = read_register(CNFG_CHG_E, (uint8_t *)&(reg_cnfg_chg_e));
     if (ret != MAX77654_NO_ERROR) {
@@ -2044,7 +2044,7 @@
 
 int MAX77654::SetFastChargeCCJEITA(chg_cc_t chg_cc_jeita)
 {
-	reg_cnfg_chg_f_t reg_cnfg_chg_f;
+	reg_cnfg_chg_f_t reg_cnfg_chg_f = {0};
 
     SET_BIT_FIELD(CNFG_CHG_F, reg_cnfg_chg_f, reg_cnfg_chg_f.bits.chg_cc_jeita, chg_cc_jeita);
 
@@ -2054,7 +2054,7 @@
 int MAX77654::GetFastChargeCCJEITA(chg_cc_t *chg_cc_jeita)
 {
     int ret;
-    reg_cnfg_chg_f_t reg_cnfg_chg_f;
+    reg_cnfg_chg_f_t reg_cnfg_chg_f = {0};
 
     ret = read_register(CNFG_CHG_F, (uint8_t *)&(reg_cnfg_chg_f));
     if (ret != MAX77654_NO_ERROR) {
@@ -2068,7 +2068,7 @@
 
 int MAX77654::SetThermistorEnable(thm_en_t thm_en)
 {
-	reg_cnfg_chg_f_t reg_cnfg_chg_f;
+	reg_cnfg_chg_f_t reg_cnfg_chg_f = {0};
 
     SET_BIT_FIELD(CNFG_CHG_F, reg_cnfg_chg_f, reg_cnfg_chg_f.bits.thm_en, thm_en);
 
@@ -2078,7 +2078,7 @@
 int MAX77654::GetThermistorEnable(thm_en_t *thm_en)
 {
     int ret;
-    reg_cnfg_chg_f_t reg_cnfg_chg_f;
+    reg_cnfg_chg_f_t reg_cnfg_chg_f = {0};
 
     ret = read_register(CNFG_CHG_F, (uint8_t *)&(reg_cnfg_chg_f));
     if (ret != MAX77654_NO_ERROR) {
@@ -2092,7 +2092,7 @@
 
 int MAX77654::SetFastChargeBatteryRegVolt(chg_cv_t chg_cv)
 {
-	reg_cnfg_chg_g_t reg_cnfg_chg_g;
+	reg_cnfg_chg_g_t reg_cnfg_chg_g = {0};
 
     SET_BIT_FIELD(CNFG_CHG_G, reg_cnfg_chg_g, reg_cnfg_chg_g.bits.chg_cv, chg_cv);
 
@@ -2102,7 +2102,7 @@
 int MAX77654::GetFastChargeBatteryRegVolt(chg_cv_t *chg_cv)
 {
     int ret;
-    reg_cnfg_chg_g_t reg_cnfg_chg_g;
+    reg_cnfg_chg_g_t reg_cnfg_chg_g = {0};
 
     ret = read_register(CNFG_CHG_G, (uint8_t *)&(reg_cnfg_chg_g));
     if (ret != MAX77654_NO_ERROR) {
@@ -2116,7 +2116,7 @@
 
 int MAX77654::SetCHGINUSBSuspendMode(usbs_t usbs)
 {
-	reg_cnfg_chg_g_t reg_cnfg_chg_g;
+	reg_cnfg_chg_g_t reg_cnfg_chg_g = {0};
 
     SET_BIT_FIELD(CNFG_CHG_G, reg_cnfg_chg_g, reg_cnfg_chg_g.bits.usbs, usbs);
 
@@ -2126,7 +2126,7 @@
 int MAX77654::GetCHGINUSBSuspendMode(usbs_t *usbs)
 {
     int ret;
-    reg_cnfg_chg_g_t reg_cnfg_chg_g;
+    reg_cnfg_chg_g_t reg_cnfg_chg_g = {0};
 
     ret = read_register(CNFG_CHG_G, (uint8_t *)&(reg_cnfg_chg_g));
     if (ret != MAX77654_NO_ERROR) {
@@ -2140,7 +2140,7 @@
 
 int MAX77654::SetFastChargeVoltageJEITA(chg_cv_t chg_cv_jeita)
 {
-	reg_cnfg_chg_h_t reg_cnfg_chg_h;
+	reg_cnfg_chg_h_t reg_cnfg_chg_h = {0};
 
     SET_BIT_FIELD(CNFG_CHG_H, reg_cnfg_chg_h, reg_cnfg_chg_h.bits.chg_cv_jeita, chg_cv_jeita);
 
@@ -2150,7 +2150,7 @@
 int MAX77654::GetFastChargeVoltageJEITA(chg_cv_t *chg_cv_jeita)
 {
     int ret;
-    reg_cnfg_chg_h_t reg_cnfg_chg_h;
+    reg_cnfg_chg_h_t reg_cnfg_chg_h = {0};
 
     ret = read_register(CNFG_CHG_H, (uint8_t *)&(reg_cnfg_chg_h));
     if (ret != MAX77654_NO_ERROR) {
@@ -2164,7 +2164,7 @@
 
 int MAX77654::SetDischargeCurrentFullScale(imon_dischg_scale_t imon_dischg_scale)
 {
-	reg_cnfg_chg_i_t reg_cnfg_chg_i;
+	reg_cnfg_chg_i_t reg_cnfg_chg_i = {0};
 
     SET_BIT_FIELD(CNFG_CHG_I, reg_cnfg_chg_i, reg_cnfg_chg_i.bits.imon_dischg_scale, imon_dischg_scale);
 
@@ -2174,7 +2174,7 @@
 int MAX77654::GetDischargeCurrentFullScale(imon_dischg_scale_t *imon_dischg_scale)
 {
     int ret;
-    reg_cnfg_chg_i_t reg_cnfg_chg_i;
+    reg_cnfg_chg_i_t reg_cnfg_chg_i = {0};
 
     ret = read_register(CNFG_CHG_I, (uint8_t *)&(reg_cnfg_chg_i));
     if (ret != MAX77654_NO_ERROR) {
@@ -2188,7 +2188,7 @@
 
 int MAX77654::SetAMUX(mux_sel_t mux_sel)
 {
-	reg_cnfg_chg_i_t reg_cnfg_chg_i;
+	reg_cnfg_chg_i_t reg_cnfg_chg_i = {0};
 
     SET_BIT_FIELD(CNFG_CHG_I, reg_cnfg_chg_i, reg_cnfg_chg_i.bits.mux_sel, mux_sel);
 
@@ -2198,7 +2198,7 @@
 int MAX77654::GetAMUX(mux_sel_t *mux_sel)
 {
     int ret;
-    reg_cnfg_chg_i_t reg_cnfg_chg_i;
+    reg_cnfg_chg_i_t reg_cnfg_chg_i = {0};
 
     ret = read_register(CNFG_CHG_I, (uint8_t *)&(reg_cnfg_chg_i));
     if (ret != MAX77654_NO_ERROR) {
@@ -2213,15 +2213,15 @@
 int MAX77654::SetSBBTargetOutVoltage(uint8_t channel, tv_sbb_t tv_sbb)
 {
     if (channel == 0) {
-    	reg_cnfg_sbb0_a_t reg_cnfg_sbb0_a;
+    	reg_cnfg_sbb0_a_t reg_cnfg_sbb0_a = {0};
         SET_BIT_FIELD(CNFG_SBB0_A, reg_cnfg_sbb0_a, reg_cnfg_sbb0_a.bits.tv_sbb0, tv_sbb);
     }
     else if (channel == 1) {
-    	reg_cnfg_sbb1_a_t reg_cnfg_sbb1_a;
+    	reg_cnfg_sbb1_a_t reg_cnfg_sbb1_a = {0};
         SET_BIT_FIELD(CNFG_SBB1_A, reg_cnfg_sbb1_a, reg_cnfg_sbb1_a.bits.tv_sbb1, tv_sbb);
     }
     else if (channel == 2) {
-    	reg_cnfg_sbb2_a_t reg_cnfg_sbb2_a;
+    	reg_cnfg_sbb2_a_t reg_cnfg_sbb2_a = {0};
         SET_BIT_FIELD(CNFG_SBB2_A, reg_cnfg_sbb2_a, reg_cnfg_sbb2_a.bits.tv_sbb2, tv_sbb);
     }
     else {
@@ -2236,7 +2236,7 @@
     int ret;
 
     if (channel == 0) {
-    	reg_cnfg_sbb0_a_t reg_cnfg_sbb0_a;
+    	reg_cnfg_sbb0_a_t reg_cnfg_sbb0_a = {0};
         ret = read_register(CNFG_SBB0_A, (uint8_t *)&(reg_cnfg_sbb0_a));
         if (ret != MAX77654_NO_ERROR) {
         return ret;
@@ -2244,7 +2244,7 @@
         *tv_sbb = (tv_sbb_t)reg_cnfg_sbb0_a.bits.tv_sbb0;
     }
     else if (channel == 1) {
-    	reg_cnfg_sbb1_a_t reg_cnfg_sbb1_a;
+    	reg_cnfg_sbb1_a_t reg_cnfg_sbb1_a = {0};
         ret = read_register(CNFG_SBB1_A, (uint8_t *)&(reg_cnfg_sbb1_a));
         if (ret != MAX77654_NO_ERROR) {
         return ret;
@@ -2252,7 +2252,7 @@
         *tv_sbb = (tv_sbb_t)reg_cnfg_sbb1_a.bits.tv_sbb1;
     }
     else if (channel == 2) {
-    	reg_cnfg_sbb2_a_t reg_cnfg_sbb2_a;
+    	reg_cnfg_sbb2_a_t reg_cnfg_sbb2_a = {0};
         ret = read_register(CNFG_SBB2_A, (uint8_t *)&(reg_cnfg_sbb2_a));
         if (ret != MAX77654_NO_ERROR) {
         return ret;
@@ -2269,15 +2269,15 @@
 int MAX77654::SetSIMOOperationMode(uint8_t channel, op_mode_t op_mode)
 {
     if (channel == 0) {
-    	reg_cnfg_sbb0_b_t reg_cnfg_sbb0_b;
+    	reg_cnfg_sbb0_b_t reg_cnfg_sbb0_b = {0};
         SET_BIT_FIELD(CNFG_SBB0_B, reg_cnfg_sbb0_b, reg_cnfg_sbb0_b.bits.op_mode, op_mode);
     }
     else if (channel == 1) {
-    	reg_cnfg_sbb1_b_t reg_cnfg_sbb1_b;
+    	reg_cnfg_sbb1_b_t reg_cnfg_sbb1_b = {0};
         SET_BIT_FIELD(CNFG_SBB1_B, reg_cnfg_sbb1_b, reg_cnfg_sbb1_b.bits.op_mode, op_mode);
     }
     else if (channel == 2) {
-    	reg_cnfg_sbb2_b_t reg_cnfg_sbb2_b;
+    	reg_cnfg_sbb2_b_t reg_cnfg_sbb2_b = {0};
         SET_BIT_FIELD(CNFG_SBB2_B, reg_cnfg_sbb2_b, reg_cnfg_sbb2_b.bits.op_mode, op_mode);
     }
     else {
@@ -2292,7 +2292,7 @@
     int ret;
 
     if (channel == 0) {
-    	reg_cnfg_sbb0_b_t reg_cnfg_sbb0_b;
+    	reg_cnfg_sbb0_b_t reg_cnfg_sbb0_b = {0};
         ret = read_register(CNFG_SBB0_B, (uint8_t *)&(reg_cnfg_sbb0_b));
         if (ret != MAX77654_NO_ERROR) {
         return ret;
@@ -2300,7 +2300,7 @@
         *op_mode = (op_mode_t)reg_cnfg_sbb0_b.bits.op_mode;
     }
     else if (channel == 1) {
-    	reg_cnfg_sbb1_b_t reg_cnfg_sbb1_b;
+    	reg_cnfg_sbb1_b_t reg_cnfg_sbb1_b = {0};
         ret = read_register(CNFG_SBB1_B, (uint8_t *)&(reg_cnfg_sbb1_b));
         if (ret != MAX77654_NO_ERROR) {
         return ret;
@@ -2308,7 +2308,7 @@
         *op_mode = (op_mode_t)reg_cnfg_sbb1_b.bits.op_mode;
     }
     else if (channel == 2) {
-    	reg_cnfg_sbb2_b_t reg_cnfg_sbb2_b;
+    	reg_cnfg_sbb2_b_t reg_cnfg_sbb2_b = {0};
         ret = read_register(CNFG_SBB2_B, (uint8_t *)&(reg_cnfg_sbb2_b));
         if (ret != MAX77654_NO_ERROR) {
         return ret;
@@ -2325,15 +2325,15 @@
 int MAX77654::SetSBBPeakCurrentLimit(uint8_t channel, ip_sbb_t ip_sbb)
 {
     if (channel == 0) {
-    	reg_cnfg_sbb0_b_t reg_cnfg_sbb0_b;
+    	reg_cnfg_sbb0_b_t reg_cnfg_sbb0_b = {0};
         SET_BIT_FIELD(CNFG_SBB0_B, reg_cnfg_sbb0_b, reg_cnfg_sbb0_b.bits.ip_sbb0, ip_sbb);
     }
     else if (channel == 1) {
-    	reg_cnfg_sbb1_b_t reg_cnfg_sbb1_b;
+    	reg_cnfg_sbb1_b_t reg_cnfg_sbb1_b = {0};
         SET_BIT_FIELD(CNFG_SBB1_B, reg_cnfg_sbb1_b, reg_cnfg_sbb1_b.bits.ip_sbb1, ip_sbb);
     }
     else if (channel == 2) {
-    	reg_cnfg_sbb2_b_t reg_cnfg_sbb2_b;
+    	reg_cnfg_sbb2_b_t reg_cnfg_sbb2_b = {0};
         SET_BIT_FIELD(CNFG_SBB2_B, reg_cnfg_sbb2_b, reg_cnfg_sbb2_b.bits.ip_sbb2, ip_sbb);
     }
     else {
@@ -2348,7 +2348,7 @@
     int ret;
 
     if (channel == 0) {
-    	reg_cnfg_sbb0_b_t reg_cnfg_sbb0_b;
+    	reg_cnfg_sbb0_b_t reg_cnfg_sbb0_b = {0};
         ret = read_register(CNFG_SBB0_B, (uint8_t *)&(reg_cnfg_sbb0_b));
         if (ret != MAX77654_NO_ERROR) {
         return ret;
@@ -2356,7 +2356,7 @@
         *ip_sbb = (ip_sbb_t)reg_cnfg_sbb0_b.bits.ip_sbb0;
     }
     else if (channel == 1) {
-    	reg_cnfg_sbb1_b_t reg_cnfg_sbb1_b;
+    	reg_cnfg_sbb1_b_t reg_cnfg_sbb1_b = {0};
         ret = read_register(CNFG_SBB1_B, (uint8_t *)&(reg_cnfg_sbb1_b));
         if (ret != MAX77654_NO_ERROR) {
         return ret;
@@ -2364,7 +2364,7 @@
         *ip_sbb = (ip_sbb_t)reg_cnfg_sbb1_b.bits.ip_sbb1;
     }
     else if (channel == 2) {
-    	reg_cnfg_sbb2_b_t reg_cnfg_sbb2_b;
+    	reg_cnfg_sbb2_b_t reg_cnfg_sbb2_b = {0};
         ret = read_register(CNFG_SBB2_B, (uint8_t *)&(reg_cnfg_sbb2_b));
         if (ret != MAX77654_NO_ERROR) {
         return ret;
@@ -2381,15 +2381,15 @@
 int MAX77654::SetSBBActiveDischargeEnable(uint8_t channel, ade_sbb_t ade_sbb)
 {
     if (channel == 0) {
-    	reg_cnfg_sbb0_b_t reg_cnfg_sbb0_b;
+    	reg_cnfg_sbb0_b_t reg_cnfg_sbb0_b = {0};
         SET_BIT_FIELD(CNFG_SBB0_B, reg_cnfg_sbb0_b, reg_cnfg_sbb0_b.bits.ade_sbb0, ade_sbb);
     }
     else if (channel == 1) {
-    	reg_cnfg_sbb1_b_t reg_cnfg_sbb1_b;
+    	reg_cnfg_sbb1_b_t reg_cnfg_sbb1_b = {0};
         SET_BIT_FIELD(CNFG_SBB1_B, reg_cnfg_sbb1_b, reg_cnfg_sbb1_b.bits.ade_sbb1, ade_sbb);
     }
     else if (channel == 2) {
-    	reg_cnfg_sbb2_b_t reg_cnfg_sbb2_b;
+    	reg_cnfg_sbb2_b_t reg_cnfg_sbb2_b = {0};
         SET_BIT_FIELD(CNFG_SBB2_B, reg_cnfg_sbb2_b, reg_cnfg_sbb2_b.bits.ade_sbb2, ade_sbb);
     }
     else {
@@ -2404,7 +2404,7 @@
     int ret;
     
     if (channel == 0) {
-    	reg_cnfg_sbb0_b_t reg_cnfg_sbb0_b;
+    	reg_cnfg_sbb0_b_t reg_cnfg_sbb0_b = {0};
         ret = read_register(CNFG_SBB0_B, (uint8_t *)&(reg_cnfg_sbb0_b));
         if (ret != MAX77654_NO_ERROR) {
         return ret;
@@ -2412,7 +2412,7 @@
         *ade_sbb = (ade_sbb_t)reg_cnfg_sbb0_b.bits.ade_sbb0;
     }
     else if (channel == 1) {
-    	reg_cnfg_sbb1_b_t reg_cnfg_sbb1_b;
+    	reg_cnfg_sbb1_b_t reg_cnfg_sbb1_b = {0};
         ret = read_register(CNFG_SBB1_B, (uint8_t *)&(reg_cnfg_sbb1_b));
         if (ret != MAX77654_NO_ERROR) {
         return ret;
@@ -2420,7 +2420,7 @@
         *ade_sbb = (ade_sbb_t)reg_cnfg_sbb1_b.bits.ade_sbb1;
     }
     else if (channel == 2) {
-    	reg_cnfg_sbb2_b_t reg_cnfg_sbb2_b;
+    	reg_cnfg_sbb2_b_t reg_cnfg_sbb2_b = {0};
         ret = read_register(CNFG_SBB2_B, (uint8_t *)&(reg_cnfg_sbb2_b));
         if (ret != MAX77654_NO_ERROR) {
         return ret;
@@ -2437,15 +2437,15 @@
 int MAX77654::SetSBBEnableControl(uint8_t channel, en_sbb_t en_sbb)
 {
     if (channel == 0) {
-    	reg_cnfg_sbb0_b_t reg_cnfg_sbb0_b;
+    	reg_cnfg_sbb0_b_t reg_cnfg_sbb0_b = {0};
         SET_BIT_FIELD(CNFG_SBB0_B, reg_cnfg_sbb0_b, reg_cnfg_sbb0_b.bits.en_sbb0, en_sbb);
     }
     else if (channel == 1) {
-    	reg_cnfg_sbb1_b_t reg_cnfg_sbb1_b;
+    	reg_cnfg_sbb1_b_t reg_cnfg_sbb1_b = {0};
         SET_BIT_FIELD(CNFG_SBB1_B, reg_cnfg_sbb1_b, reg_cnfg_sbb1_b.bits.en_sbb1, en_sbb);
     }
     else if (channel == 2) {
-    	reg_cnfg_sbb2_b_t reg_cnfg_sbb2_b;
+    	reg_cnfg_sbb2_b_t reg_cnfg_sbb2_b = {0};
         SET_BIT_FIELD(CNFG_SBB2_B, reg_cnfg_sbb2_b, reg_cnfg_sbb2_b.bits.en_sbb2, en_sbb);
     }
     else {
@@ -2460,7 +2460,7 @@
     int ret;
 
     if (channel == 0) {
-    	reg_cnfg_sbb0_b_t reg_cnfg_sbb0_b;
+    	reg_cnfg_sbb0_b_t reg_cnfg_sbb0_b = {0};
         ret = read_register(CNFG_SBB0_B, (uint8_t *)&(reg_cnfg_sbb0_b));
         if (ret != MAX77654_NO_ERROR) {
         return ret;
@@ -2468,7 +2468,7 @@
         *en_sbb = (en_sbb_t)reg_cnfg_sbb0_b.bits.en_sbb0;
     }
     else if (channel == 1) {
-    	reg_cnfg_sbb1_b_t reg_cnfg_sbb1_b;
+    	reg_cnfg_sbb1_b_t reg_cnfg_sbb1_b = {0};
         ret = read_register(CNFG_SBB1_B, (uint8_t *)&(reg_cnfg_sbb1_b));
         if (ret != MAX77654_NO_ERROR) {
         return ret;
@@ -2476,7 +2476,7 @@
         *en_sbb = (en_sbb_t)reg_cnfg_sbb1_b.bits.en_sbb1;
     }
     else if (channel == 2) {
-    	reg_cnfg_sbb2_b_t reg_cnfg_sbb2_b;
+    	reg_cnfg_sbb2_b_t reg_cnfg_sbb2_b = {0};
         ret = read_register(CNFG_SBB2_B, (uint8_t *)&(reg_cnfg_sbb2_b));
         if (ret != MAX77654_NO_ERROR) {
         return ret;
@@ -2492,7 +2492,7 @@
 
 int MAX77654::SetCHGINInputCurrentLimit(ichgin_lim_def_t ichgin_lim_def)
 {
-	reg_cnfg_sbb_top_t reg_cnfg_sbb_top;
+	reg_cnfg_sbb_top_t reg_cnfg_sbb_top = {0};
 
     SET_BIT_FIELD(CNFG_SBB_TOP, reg_cnfg_sbb_top, reg_cnfg_sbb_top.bits.ichgin_lim_def, ichgin_lim_def);
 
@@ -2502,7 +2502,7 @@
 int MAX77654::GetCHGINInputCurrentLimit(ichgin_lim_def_t *ichgin_lim_def)
 {
     int ret;
-    reg_cnfg_sbb_top_t reg_cnfg_sbb_top;
+    reg_cnfg_sbb_top_t reg_cnfg_sbb_top = {0};
 
     ret = read_register(CNFG_SBB_TOP, (uint8_t *)&(reg_cnfg_sbb_top));
     if (ret != MAX77654_NO_ERROR) {
@@ -2516,7 +2516,7 @@
 
 int MAX77654::SetSBBDriveStrength(drv_sbb_t drv_sbb)
 {
-	reg_cnfg_sbb_top_t reg_cnfg_sbb_top;
+	reg_cnfg_sbb_top_t reg_cnfg_sbb_top = {0};
 
     SET_BIT_FIELD(CNFG_SBB_TOP, reg_cnfg_sbb_top, reg_cnfg_sbb_top.bits.drv_sbb, drv_sbb);
 
@@ -2526,7 +2526,7 @@
 int MAX77654::GetSBBDriveStrength(drv_sbb_t *drv_sbb)
 {
     int ret;
-    reg_cnfg_sbb_top_t reg_cnfg_sbb_top;
+    reg_cnfg_sbb_top_t reg_cnfg_sbb_top = {0};
 
     ret = read_register(CNFG_SBB_TOP, (uint8_t *)&(reg_cnfg_sbb_top));
     if (ret != MAX77654_NO_ERROR) {
@@ -2541,11 +2541,11 @@
 int MAX77654::SetLDOTargetOutVoltage(uint8_t channel, tv_ldo_t tv_ldo)
 {
     if (channel == 0) {
-    	reg_cnfg_ldo0_a_t reg_cnfg_ldo0_a;
+    	reg_cnfg_ldo0_a_t reg_cnfg_ldo0_a = {0};
         SET_BIT_FIELD(CNFG_LDO0_A, reg_cnfg_ldo0_a, reg_cnfg_ldo0_a.bits.tv_ldo0, tv_ldo);
     }
     else if (channel == 1) {
-    	reg_cnfg_ldo1_a_t reg_cnfg_ldo1_a;
+    	reg_cnfg_ldo1_a_t reg_cnfg_ldo1_a = {0};
         SET_BIT_FIELD(CNFG_LDO1_A, reg_cnfg_ldo1_a, reg_cnfg_ldo1_a.bits.tv_ldo1, tv_ldo);
     }
     else {
@@ -2560,7 +2560,7 @@
     int ret;
 
     if (channel == 0) {
-    	reg_cnfg_ldo0_a_t reg_cnfg_ldo0_a;
+    	reg_cnfg_ldo0_a_t reg_cnfg_ldo0_a = {0};
         ret = read_register(CNFG_LDO0_A, (uint8_t *)&(reg_cnfg_ldo0_a));
         if (ret != MAX77654_NO_ERROR) {
         return ret;
@@ -2568,7 +2568,7 @@
         *tv_ldo = (tv_ldo_t)reg_cnfg_ldo0_a.bits.tv_ldo0;
     }
     else if (channel == 1) {
-    	reg_cnfg_ldo1_a_t reg_cnfg_ldo1_a;
+    	reg_cnfg_ldo1_a_t reg_cnfg_ldo1_a = {0};
         ret = read_register(CNFG_LDO1_A, (uint8_t *)&(reg_cnfg_ldo1_a));
         if (ret != MAX77654_NO_ERROR) {
         return ret;
@@ -2585,11 +2585,11 @@
 int MAX77654::SetLDOMode(uint8_t channel, ldo_md_t ldo_md)
 {
     if (channel == 0) {
-    	reg_cnfg_ldo0_b_t reg_cnfg_ldo0_b;
+    	reg_cnfg_ldo0_b_t reg_cnfg_ldo0_b = {0};
         SET_BIT_FIELD(CNFG_LDO0_B, reg_cnfg_ldo0_b, reg_cnfg_ldo0_b.bits.ldo0_md, ldo_md);
     }
     else if (channel == 1) {
-    	reg_cnfg_ldo1_b_t reg_cnfg_ldo1_b;
+    	reg_cnfg_ldo1_b_t reg_cnfg_ldo1_b = {0};
         SET_BIT_FIELD(CNFG_LDO1_B, reg_cnfg_ldo1_b, reg_cnfg_ldo1_b.bits.ldo1_md, ldo_md);
     }
     else {
@@ -2604,7 +2604,7 @@
     int ret;
 
     if (channel == 0) {
-    	reg_cnfg_ldo0_b_t reg_cnfg_ldo0_b;
+    	reg_cnfg_ldo0_b_t reg_cnfg_ldo0_b = {0};
         ret = read_register(CNFG_LDO0_B, (uint8_t *)&(reg_cnfg_ldo0_b));
         if (ret != MAX77654_NO_ERROR) {
         return ret;
@@ -2612,7 +2612,7 @@
         *ldo_md = (ldo_md_t)reg_cnfg_ldo0_b.bits.ldo0_md;
     }
     else if (channel == 1) {
-    	reg_cnfg_ldo1_b_t reg_cnfg_ldo1_b;
+    	reg_cnfg_ldo1_b_t reg_cnfg_ldo1_b = {0};
         ret = read_register(CNFG_LDO1_B, (uint8_t *)&(reg_cnfg_ldo1_b));
         if (ret != MAX77654_NO_ERROR) {
         return ret;
@@ -2629,11 +2629,11 @@
 int MAX77654::SetLDOActiveDischargeEnable(uint8_t channel, ade_ldo_t ade_ldo)
 {
     if (channel == 0) {
-    	reg_cnfg_ldo0_b_t reg_cnfg_ldo0_b;
+    	reg_cnfg_ldo0_b_t reg_cnfg_ldo0_b = {0};
         SET_BIT_FIELD(CNFG_LDO0_B, reg_cnfg_ldo0_b, reg_cnfg_ldo0_b.bits.ade_ldo0, ade_ldo);
     }
     else if (channel == 1) {
-    	reg_cnfg_ldo1_b_t reg_cnfg_ldo1_b;
+    	reg_cnfg_ldo1_b_t reg_cnfg_ldo1_b = {0};
         SET_BIT_FIELD(CNFG_LDO1_B, reg_cnfg_ldo1_b, reg_cnfg_ldo1_b.bits.ade_ldo1, ade_ldo);
     }
     else {
@@ -2648,7 +2648,7 @@
     int ret;
 
     if (channel == 0) {
-    	reg_cnfg_ldo0_b_t reg_cnfg_ldo0_b;
+    	reg_cnfg_ldo0_b_t reg_cnfg_ldo0_b = {0};
         ret = read_register(CNFG_LDO0_B, (uint8_t *)&(reg_cnfg_ldo0_b));
         if (ret != MAX77654_NO_ERROR) {
         return ret;
@@ -2656,7 +2656,7 @@
         *ade_ldo = (ade_ldo_t)reg_cnfg_ldo0_b.bits.ade_ldo0;
     }
     else if (channel == 1) {
-    	reg_cnfg_ldo1_b_t reg_cnfg_ldo1_b;
+    	reg_cnfg_ldo1_b_t reg_cnfg_ldo1_b = {0};
         ret = read_register(CNFG_LDO1_B, (uint8_t *)&(reg_cnfg_ldo1_b));
         if (ret != MAX77654_NO_ERROR) {
         return ret;
@@ -2673,11 +2673,11 @@
 int MAX77654::SetLDOEnableControl(uint8_t channel, en_ldo_t en_ldo)
 {
     if (channel == 0) {
-    	reg_cnfg_ldo0_b_t reg_cnfg_ldo0_b;
+    	reg_cnfg_ldo0_b_t reg_cnfg_ldo0_b = {0};
         SET_BIT_FIELD(CNFG_LDO0_B, reg_cnfg_ldo0_b, reg_cnfg_ldo0_b.bits.en_ldo0, en_ldo);
     }
     else if (channel == 1) {
-    	reg_cnfg_ldo1_b_t reg_cnfg_ldo1_b;
+    	reg_cnfg_ldo1_b_t reg_cnfg_ldo1_b = {0};
         SET_BIT_FIELD(CNFG_LDO1_B, reg_cnfg_ldo1_b, reg_cnfg_ldo1_b.bits.en_ldo1, en_ldo);
     }
     else {
@@ -2692,7 +2692,7 @@
     int ret;
 
     if (channel == 0) {
-    	reg_cnfg_ldo0_b_t reg_cnfg_ldo0_b;
+    	reg_cnfg_ldo0_b_t reg_cnfg_ldo0_b = {0};
         ret = read_register(CNFG_LDO0_B, (uint8_t *)&(reg_cnfg_ldo0_b));
         if (ret != MAX77654_NO_ERROR) {
         return ret;
@@ -2700,7 +2700,7 @@
         *en_ldo = (en_ldo_t)reg_cnfg_ldo0_b.bits.en_ldo0;
     }
     else if (channel == 1) {
-    	reg_cnfg_ldo1_b_t reg_cnfg_ldo1_b;
+    	reg_cnfg_ldo1_b_t reg_cnfg_ldo1_b = {0};
         ret = read_register(CNFG_LDO1_B, (uint8_t *)&(reg_cnfg_ldo1_b));
         if (ret != MAX77654_NO_ERROR) {
         return ret;
@@ -2764,7 +2764,7 @@
 void MAX77654::PostInterruptWork()
 {
     int ret;
-    uint8_t reg, inten, not_inten, mask;
+    uint8_t reg = 0, inten = 0, not_inten = 0, mask = 0;
 
 
     while (true) {