diff options
-rw-r--r-- | firmware/target/arm/s5l8702/ipod6g/pmu-ipod6g.c | 2 | ||||
-rw-r--r-- | firmware/target/arm/s5l8702/ipod6g/powermgmt-ipod6g.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/firmware/target/arm/s5l8702/ipod6g/pmu-ipod6g.c b/firmware/target/arm/s5l8702/ipod6g/pmu-ipod6g.c index c11c0ad416..946beb1519 100644 --- a/firmware/target/arm/s5l8702/ipod6g/pmu-ipod6g.c +++ b/firmware/target/arm/s5l8702/ipod6g/pmu-ipod6g.c @@ -73,7 +73,7 @@ int pmu_read_adc(unsigned int adc) /* millivolts */ int pmu_read_battery_voltage(void) { - return pmu_read_adc(0) * 6; + return (pmu_read_adc(1) * 2000 / 1023) + 2250; } /* milliamps */ diff --git a/firmware/target/arm/s5l8702/ipod6g/powermgmt-ipod6g.c b/firmware/target/arm/s5l8702/ipod6g/powermgmt-ipod6g.c index b88ac16d55..ace66295f8 100644 --- a/firmware/target/arm/s5l8702/ipod6g/powermgmt-ipod6g.c +++ b/firmware/target/arm/s5l8702/ipod6g/powermgmt-ipod6g.c @@ -27,25 +27,25 @@ const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] = { - 3600 + 3500 }; const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = { - 3350 + 3300 }; /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = { - { 3600, 3730, 3780, 3810, 3840, 3880, 3930, 3990, 4080, 4170, 4270 } + { 3500, 3670, 3720, 3750, 3770, 3800, 3860, 3920, 3980, 4070, 4170 } }; #if CONFIG_CHARGING /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */ const unsigned short percent_to_volt_charge[11] = { - 3800, 3900, 3990, 4070, 4140, 4200, 4250, 4290, 4320, 4340, 4350 + 3700, 3820, 3900, 3950, 3990, 4030, 4070, 4120, 4170, 4190, 4200 }; #endif /* CONFIG_CHARGING */ |