Lines Matching full:shunt
59 * based on a fixed shunt resistor value. This allows for conversion within the
61 * relative to the shunt resistor value within the driver. This is similar to
64 * The end result of this is that increasing shunt values (from a fixed 20 mOhm
65 * shunt) increase the effective current/power accuracy whilst limiting the
66 * range and decreasing shunt values decrease the effective accuracy but
70 * Current (A) = (shunt voltage register * 5) * calibration / 81920
72 * The maximum shunt voltage is 163.835 mV (0x7fff, ADC_RANGE = 0, gain = 4).
73 * With the maximum current value of 0x7fff and a fixed shunt value results in
84 * to be scaled by the difference between the fixed shunt resistor and the
85 * actual shunt resistor:
87 * shunt = 0x4000 / (819.2 * 10^6) / 0.001 = 20000 uOhms (with 1mA/lsb)
506 /* 0: shunt voltage */
511 /* 0: current through shunt */
555 /* load shunt value */ in ina238_probe()
557 if (device_property_read_u32(dev, "shunt-resistor", &data->rshunt) < 0 && pdata) in ina238_probe()
560 dev_err(dev, "invalid shunt resister value %u\n", data->rshunt); in ina238_probe()
564 /* load shunt gain value */ in ina238_probe()
565 if (device_property_read_u32(dev, "ti,shunt-gain", &data->gain) < 0) in ina238_probe()
568 dev_err(dev, "invalid shunt gain value %u\n", data->gain); in ina238_probe()