Lines Matching +full:gain +full:- +full:milli
1 // SPDX-License-Identifier: GPL-2.0-or-later
86 val = -val; in val2linear11()
95 while (val < MIN_LIN_MANTISSA && exponent > -15) { in val2linear11()
96 exponent--; in val2linear11()
100 /* Convert mantissa from milli-units to units */ in val2linear11()
105 mantissa = -mantissa; in val2linear11()
132 ret = (data->vout_format[page] == vid) ? in mp2856_read_vout()
154 * Output value is calculated as: (READ_CSx * 12.5mV - 1.23V) / (Kcs * Rcs) in mp2856_read_phase()
156 val = (ret * 125) - 12300; in mp2856_read_phase()
186 return -ENODATA; in mp2856_read_phases()
199 return -ENODATA; in mp2856_read_phases()
224 return -ENODATA; in mp2856_read_word_data()
238 return -ENODATA; in mp2856_read_byte_data()
271 data->info.phases[0] = (ret > data->max_phases[0]) ? in mp2856_identify_multiphase_rail1()
272 data->max_phases[0] : ret; in mp2856_identify_multiphase_rail1()
274 for (i = 0 ; i < data->info.phases[0]; i++) in mp2856_identify_multiphase_rail1()
275 data->info.pfunc[i] |= PMBUS_HAVE_IOUT; in mp2856_identify_multiphase_rail1()
291 data->info.phases[1] = (ret > data->max_phases[1]) ? in mp2856_identify_multiphase_rail2()
292 data->max_phases[1] : ret; in mp2856_identify_multiphase_rail2()
294 for (i = 0 ; i < data->info.phases[0]; i++) in mp2856_identify_multiphase_rail2()
295 data->info.pfunc[i] |= PMBUS_HAVE_IOUT; in mp2856_identify_multiphase_rail2()
307 * Obtain DrMOS current sense gain of power stage from the register in mp2856_current_sense_gain_get()
308 * MP2856_MFR_VR_CONFIG1, bits 13-12. The value is selected as below: in mp2856_current_sense_gain_get()
309 * 00b - 5µA/A, 01b - 8.5µA/A, 10b - 9.7µA/A, 11b - 10µA/A. Other in mp2856_current_sense_gain_get()
312 for (i = 0 ; i < data->info.pages; i++) { in mp2856_current_sense_gain_get()
323 data->curr_sense_gain[i] = 50; in mp2856_current_sense_gain_get()
326 data->curr_sense_gain[i] = 85; in mp2856_current_sense_gain_get()
329 data->curr_sense_gain[i] = 97; in mp2856_current_sense_gain_get()
332 data->curr_sense_gain[i] = 100; in mp2856_current_sense_gain_get()
345 for (i = 0; i < data->info.pages; i++) { in mp2856_identify_vout_format()
354 data->vout_format[i] = (ret & MP2856_VOUT_MODE) ? linear : vid; in mp2856_identify_vout_format()
402 data = devm_kzalloc(&client->dev, sizeof(struct mp2856_data), in mp2856_probe()
405 return -ENOMEM; in mp2856_probe()
409 memcpy(data->max_phases, mp2856_max_phases[chip_id], in mp2856_probe()
410 sizeof(data->max_phases)); in mp2856_probe()
412 memcpy(&data->info, &mp2856_info, sizeof(*info)); in mp2856_probe()
413 info = &data->info; in mp2856_probe()
426 info->pages = 1; in mp2856_probe()
429 /* Obtain current sense gain of power stage. */ in mp2856_probe()