Lines Matching refs:curr_index
1140 int curr_index, prev_curr_index, shift_value, i; in ab8500_charger_set_current() local
1158 curr_index = ab8500_current_to_regval(di, ich); in ab8500_charger_set_current()
1166 curr_index = ab8500_vbus_in_curr_to_regval(di, ich); in ab8500_charger_set_current()
1175 curr_index = ab8500_current_to_regval(di, ich); in ab8500_charger_set_current()
1177 if (curr_index && (curr_index - prev_curr_index) > 1) in ab8500_charger_set_current()
1190 if (curr_index < 0) { in ab8500_charger_set_current()
1197 if (prev_curr_index == curr_index) { in ab8500_charger_set_current()
1209 reg, (u8)curr_index << shift_value); in ab8500_charger_set_current()
1212 } else if (prev_curr_index > curr_index) { in ab8500_charger_set_current()
1213 for (i = prev_curr_index - 1; i >= curr_index; i--) { in ab8500_charger_set_current()
1222 if (i != curr_index) in ab8500_charger_set_current()
1227 for (i = prev_curr_index + 1; i <= curr_index && allow; i++) { in ab8500_charger_set_current()
1236 if (i != curr_index) in ab8500_charger_set_current()
1382 int curr_index; in ab8500_charger_ac_en() local
1419 curr_index = ab8500_current_to_regval(di, iset); in ab8500_charger_ac_en()
1422 if (volt_index < 0 || curr_index < 0 || input_curr_index < 0) { in ab8500_charger_ac_en()
1559 int curr_index; in ab8500_charger_usb_en() local
1595 curr_index = ab8500_current_to_regval(di, ich_out); in ab8500_charger_usb_en()
1596 if (volt_index < 0 || curr_index < 0) { in ab8500_charger_usb_en()