Lines Matching refs:gain
110 int gain; member
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()
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()
613 client->name, data->rshunt, data->gain); in ina238_probe()