--- axp313a.c.orig Sun Jul 16 20:11:09 2023 +++ axp313a.c Sat Jul 22 05:54:00 2023 @@ -30,7 +30,7 @@ { int ret; u8 cfg; - +while(1); if (mvolt >= 1600) cfg = 88 + axp313a_mvolt_to_cfg(mvolt, 1600, 3400, 100); else if (mvolt >= 1220) @@ -54,7 +54,7 @@ { int ret; u8 cfg; - +while(1); if (mvolt >= 1220) cfg = 71 + axp313a_mvolt_to_cfg(mvolt, 1220, 1540, 20); else @@ -76,7 +76,7 @@ { int ret; u8 cfg; - +while(1); if (mvolt >= 1220) cfg = 71 + axp313a_mvolt_to_cfg(mvolt, 1220, 1840, 20); else @@ -98,7 +98,7 @@ { int ret; u8 cfg = axp313a_mvolt_to_cfg(mvolt, 500, 3500, 100); - +while(1); if (mvolt == 0) return pmic_bus_clrbits(AXP313A_OUTPUT_CTRL, AXP313A_OUTPUT_CTRL_ALDO1); @@ -115,7 +115,7 @@ { int ret; u8 cfg = axp313a_mvolt_to_cfg(mvolt, 500, 3500, 100); - +while(1); if (dldo_num != 1) return -EINVAL; @@ -154,6 +154,15 @@ return -EINVAL; } +#if 1 + for (int i = 0; i < 256; i++) { + if (!(i % 16)) printf("%02x: ", i); + ret = pmic_bus_read(i, &axp_chip_id); + if (ret) printf("-- "); else printf("%02x ", axp_chip_id); + if (!((i + 1) % 16)) printf("\n"); + } +#endif +while(1); return ret; }