/* * Copyright (C) 2017 MediaTek Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ #ifndef __TMP_BATTERY_H__ #define __TMP_BATTERY_H__ #include /* Extern two API functions from battery driver * to limit max charging current. */ /** * return value means charging current in mA * -1 means error * Implementation in mt_battery.c and mt_battery_fan5405.c */ extern int get_bat_charging_current_level(void); /** * current_limit means limit of charging current in mA * -1 means no limit * Implementation in mt_battery.c and mt_battery_fan5405.c */ extern int set_bat_charging_current_limit(int current_limit); extern enum charger_type mt_get_charger_type(void); extern int read_tbat_value(void); #endif /* __TMP_BATTERY_H__ */