Lines Matching full:factor

317 	u32 factor;  in rescale_current_sense_amplifier_props()  local
331 * Calculate the scaling factor, 1 / (gain * sense), or in rescale_current_sense_amplifier_props()
335 factor = gcd(sense, 1000000); in rescale_current_sense_amplifier_props()
336 rescale->numerator = 1000000 / factor; in rescale_current_sense_amplifier_props()
337 rescale->denominator = sense / factor; in rescale_current_sense_amplifier_props()
339 factor = gcd(rescale->numerator, gain_mult); in rescale_current_sense_amplifier_props()
340 rescale->numerator /= factor; in rescale_current_sense_amplifier_props()
341 rescale->denominator *= gain_mult / factor; in rescale_current_sense_amplifier_props()
343 factor = gcd(rescale->denominator, gain_div); in rescale_current_sense_amplifier_props()
344 rescale->numerator *= gain_div / factor; in rescale_current_sense_amplifier_props()
345 rescale->denominator /= factor; in rescale_current_sense_amplifier_props()
354 u32 factor; in rescale_current_sense_shunt_props() local
364 factor = gcd(shunt, 1000000); in rescale_current_sense_shunt_props()
365 rescale->numerator = 1000000 / factor; in rescale_current_sense_shunt_props()
366 rescale->denominator = shunt / factor; in rescale_current_sense_shunt_props()
375 u32 factor; in rescale_voltage_divider_props() local
391 factor = gcd(rescale->numerator, rescale->denominator); in rescale_voltage_divider_props()
392 rescale->numerator /= factor; in rescale_voltage_divider_props()
393 rescale->denominator /= factor; in rescale_voltage_divider_props()
401 u32 factor; in rescale_temp_sense_rtd_props() local
430 factor = gcd(tmp, 1000000); in rescale_temp_sense_rtd_props()
431 rescale->numerator = 1000000 / factor; in rescale_temp_sense_rtd_props()
432 rescale->denominator = tmp / factor; in rescale_temp_sense_rtd_props()
550 dev_err(dev, "invalid scaling factor.\n"); in rescale_probe()