/*Limit input & charging current according to the max current*/
if (battery->cable_type == POWER_SUPPLY_TYPE_PREPARE_TA ||
battery->cable_type == POWER_SUPPLY_TYPE_USB_PD) {
+#if defined(CONFIG_USE_CCIC)
pr_info("%s, %d, %d\n", __func__, input_current, battery->pd_input_current);
input_current = battery->pd_input_current;
+#endif
if (input_current >= 1500)
input_current = input_current - 50;
-
+#if defined(CONFIG_SMALL_CHARGER)
if (input_current > 2000) {
battery->small_input_flag = input_current - 2000;
input_current = 2000;
}
+#endif
} else {
if (battery->rp_attach &&
!(battery->cable_type == POWER_SUPPLY_TYPE_BATTERY ||
battery->input_current = 0;
battery->charging_current = 0;
battery->topoff_current = 0;
+#if defined(CONFIG_SMALL_CHARGER)
battery->small_input_flag = 0;
+#endif
break;
case POWER_SUPPLY_STATUS_FULL:
battery->input_current = 0;
battery->charging_current = 0;
battery->topoff_current = 0;
+#if defined(CONFIG_SMALL_CHARGER)
battery->small_input_flag = 0;
+#endif
battery->max_input_current = battery->pdata->max_input_current;
battery->max_charging_current = battery->pdata->max_charging_current;