jekhor / yogabook-linux

Yoga Book Linux porting efforts, umbrella repository for link all pieces together
74 stars 8 forks source link

Implement charge current control depended on battery temperature #4

Closed jekhor closed 5 years ago

jekhor commented 5 years ago

Battery should not be charged by high current when it too hot or too cold. Implement temp/current control table for charging. Accordingly with https://github.com/jekhor/yogabook-linux-android-kernel/blob/cm-13.0/drivers/power/bq2589x_charger.c#L1465 ,

T          I           V
<0        no charging
0..15   1536          4352
15..45  4224          4352
45..50  1536          4208
>50       no charging
jekhor commented 5 years ago

Using of BQ25892 builtin thermal sensing and JEITA regulation should be sufficient if thermistor is connected properly (seems is).