Lines Matching refs:curr_index
1115 int curr_index, prev_curr_index, shift_value, i; in ab8500_charger_set_current() local
1133 curr_index = ab8500_current_to_regval(di, ich); in ab8500_charger_set_current()
1141 curr_index = ab8500_vbus_in_curr_to_regval(di, ich); in ab8500_charger_set_current()
1150 curr_index = ab8500_current_to_regval(di, ich); in ab8500_charger_set_current()
1152 if (curr_index && (curr_index - prev_curr_index) > 1) in ab8500_charger_set_current()
1165 if (curr_index < 0) { in ab8500_charger_set_current()
1172 if (prev_curr_index == curr_index) { in ab8500_charger_set_current()
1184 reg, (u8)curr_index << shift_value); in ab8500_charger_set_current()
1187 } else if (prev_curr_index > curr_index) { in ab8500_charger_set_current()
1188 for (i = prev_curr_index - 1; i >= curr_index; i--) { in ab8500_charger_set_current()
1197 if (i != curr_index) in ab8500_charger_set_current()
1202 for (i = prev_curr_index + 1; i <= curr_index && allow; i++) { in ab8500_charger_set_current()
1211 if (i != curr_index) in ab8500_charger_set_current()
1357 int curr_index; in ab8500_charger_ac_en() local
1394 curr_index = ab8500_current_to_regval(di, iset); in ab8500_charger_ac_en()
1397 if (volt_index < 0 || curr_index < 0 || input_curr_index < 0) { in ab8500_charger_ac_en()
1534 int curr_index; in ab8500_charger_usb_en() local
1570 curr_index = ab8500_current_to_regval(di, ich_out); in ab8500_charger_usb_en()
1571 if (volt_index < 0 || curr_index < 0) { in ab8500_charger_usb_en()