Lines Matching full:gain
72 * The maximum shunt voltage is 163.835 mV (0x7fff, ADC_RANGE = 0, gain = 4).
89 * Current (mA) = register value * 20000 / rshunt / 4 * gain
90 * Power (W) = 0.2 * register value * 20000 / rshunt / 4 * gain
110 int gain; member
199 /* gain of 1 -> LSB / 4 */ in ina238_read_in()
201 (1000 * (4 - data->gain + 1)); in ina238_read_in()
228 regval = (regval * 1000 * (4 - data->gain + 1)) / in ina238_write_in()
276 *val = div_s64((s16)regval * INA238_FIXED_SHUNT * data->gain, in ina238_read_current()
301 data->gain, 20 * data->rshunt); in ina238_read_power()
315 data->gain, 20 * data->rshunt); in ina238_read_power()
348 1000ULL * INA238_FIXED_SHUNT * data->gain); in ina238_write_power()
564 /* load shunt gain value */ in ina238_probe()
565 if (device_property_read_u32(dev, "ti,shunt-gain", &data->gain) < 0) in ina238_probe()
566 data->gain = 4; /* Default of ADCRANGE = 0 */ in ina238_probe()
567 if (data->gain != 1 && data->gain != 4) { in ina238_probe()
568 dev_err(dev, "invalid shunt gain value %u\n", data->gain); in ina238_probe()
574 if (data->gain == 1) in ina238_probe()
612 dev_info(dev, "power monitor %s (Rshunt = %u uOhm, gain = %u)\n", in ina238_probe()
613 client->name, data->rshunt, data->gain); in ina238_probe()