Lines Matching refs:curr_index
1156 int curr_index, prev_curr_index, shift_value, i; in ab8500_charger_set_current() local
1174 curr_index = ab8500_current_to_regval(di, ich_ua); in ab8500_charger_set_current()
1182 curr_index = ab8500_vbus_in_curr_to_regval(di, ich_ua); in ab8500_charger_set_current()
1191 curr_index = ab8500_current_to_regval(di, ich_ua); in ab8500_charger_set_current()
1193 if (curr_index && (curr_index - prev_curr_index) > 1) in ab8500_charger_set_current()
1206 if (curr_index < 0) { in ab8500_charger_set_current()
1213 if (prev_curr_index == curr_index) { in ab8500_charger_set_current()
1225 reg, (u8)curr_index << shift_value); in ab8500_charger_set_current()
1228 } else if (prev_curr_index > curr_index) { in ab8500_charger_set_current()
1229 for (i = prev_curr_index - 1; i >= curr_index; i--) { in ab8500_charger_set_current()
1238 if (i != curr_index) in ab8500_charger_set_current()
1243 for (i = prev_curr_index + 1; i <= curr_index && allow; i++) { in ab8500_charger_set_current()
1252 if (i != curr_index) in ab8500_charger_set_current()
1398 int curr_index; in ab8500_charger_ac_en() local
1435 curr_index = ab8500_current_to_regval(di, iset_ua); in ab8500_charger_ac_en()
1438 if (volt_index < 0 || curr_index < 0 || input_curr_index < 0) { in ab8500_charger_ac_en()
1575 int curr_index; in ab8500_charger_usb_en() local
1611 curr_index = ab8500_current_to_regval(di, ich_out_ua); in ab8500_charger_usb_en()
1612 if (volt_index < 0 || curr_index < 0) { in ab8500_charger_usb_en()