OSDN Git Service
power: add charging current limitting
Charging at 3200mA while using the phone makes it quite hot.
Decrease the charging current to ~1600mA to prevent bad user
experience and complaints.
After 90 seconds with screen on, vote USB ICL to lower current
to 1600mA.
After 5 seconds with screen off, unvote USB ICL so the current
goes back to 3200mA.
Also, add compatibility with stock hvdcp service that writes to
the system_temp_level property to trigger thermal throttling.
Values taken from MIUI kernel, rewritten to look better and avoid
locking in framebuffer notifiers.
Change-Id: Iedf2789304356221283472ba242211d3ea6256d8