/kernel/linux/linux-5.10/drivers/hwmon/ |
H A D | ltc4151.c | 42 unsigned int shunt; /* in micro ohms */ member 104 val = val * 20 * 1000 / data->shunt; in ltc4151_get_value() 163 u32 shunt; in ltc4151_probe() local 173 "shunt-resistor-micro-ohms", &shunt)) in ltc4151_probe() 174 shunt = 1000; /* 1 mOhm if not set via DT */ in ltc4151_probe() 176 if (shunt == 0) in ltc4151_probe() 179 data->shunt = shunt; in ltc4151_probe()
|
H A D | ina209.c | 491 u32 shunt; in ina209_init_client() local 507 shunt = pdata->shunt_uohms; in ina209_init_client() 508 } else if (!of_property_read_u32(client->dev.of_node, "shunt-resistor", in ina209_init_client() 509 &shunt)) { in ina209_init_client() 510 if (shunt == 0) in ina209_init_client() 513 shunt = data->calibration_orig ? in ina209_init_client() 526 clamp_val(40960000 / shunt, 1, 65535)); in ina209_init_client()
|
/kernel/linux/linux-6.6/drivers/hwmon/ |
H A D | ltc4151.c | 42 unsigned int shunt; /* in micro ohms */ member 104 val = val * 20 * 1000 / data->shunt; in ltc4151_get_value() 163 u32 shunt; in ltc4151_probe() local 173 "shunt-resistor-micro-ohms", &shunt)) in ltc4151_probe() 174 shunt = 1000; /* 1 mOhm if not set via DT */ in ltc4151_probe() 176 if (shunt == 0) in ltc4151_probe() 179 data->shunt = shunt; in ltc4151_probe()
|
H A D | ina209.c | 491 u32 shunt; in ina209_init_client() local 507 shunt = pdata->shunt_uohms; in ina209_init_client() 508 } else if (!of_property_read_u32(client->dev.of_node, "shunt-resistor", in ina209_init_client() 509 &shunt)) { in ina209_init_client() 510 if (shunt == 0) in ina209_init_client() 513 shunt = data->calibration_orig ? in ina209_init_client() 526 clamp_val(40960000 / shunt, 1, 65535)); in ina209_init_client()
|
/kernel/linux/linux-5.10/drivers/iio/afe/ |
H A D | iio-rescale.c | 190 u32 shunt; in rescale_current_sense_shunt_props() local 194 ret = device_property_read_u32(dev, "shunt-resistor-micro-ohms", in rescale_current_sense_shunt_props() 195 &shunt); in rescale_current_sense_shunt_props() 197 dev_err(dev, "failed to read the shunt resistance: %d\n", ret); in rescale_current_sense_shunt_props() 201 factor = gcd(shunt, 1000000); in rescale_current_sense_shunt_props() 203 rescale->denominator = shunt / factor; in rescale_current_sense_shunt_props() 259 { .compatible = "current-sense-shunt",
|
/kernel/linux/linux-6.6/drivers/hwmon/pmbus/ |
H A D | lm25066.c | 467 u32 shunt; in lm25066_probe() local 548 if (of_property_read_u32(client->dev.of_node, "shunt-resistor-micro-ohms", &shunt)) in lm25066_probe() 549 shunt = 1000; in lm25066_probe() 551 info->m[PSC_CURRENT_IN] = info->m[PSC_CURRENT_IN] * shunt / 1000; in lm25066_probe() 552 info->m[PSC_POWER] = info->m[PSC_POWER] * shunt / 1000; in lm25066_probe()
|
H A D | adm1275.c | 520 u32 shunt; in adm1275_probe() local 576 "shunt-resistor-micro-ohms", &shunt)) in adm1275_probe() 577 shunt = 1000; /* 1 mOhm if not set via DT */ in adm1275_probe() 579 if (shunt == 0) in adm1275_probe() 834 coefficients[cindex].m * shunt / 1000; in adm1275_probe() 840 coefficients[pindex].m * shunt / 1000; in adm1275_probe()
|
/kernel/linux/linux-5.10/drivers/hwmon/pmbus/ |
H A D | adm1275.c | 496 u32 shunt; in adm1275_probe() local 552 "shunt-resistor-micro-ohms", &shunt)) in adm1275_probe() 553 shunt = 1000; /* 1 mOhm if not set via DT */ in adm1275_probe() 555 if (shunt == 0) in adm1275_probe() 812 coefficients[cindex].m * shunt / 1000; in adm1275_probe() 818 coefficients[pindex].m * shunt / 1000; in adm1275_probe()
|
/kernel/linux/linux-6.6/drivers/iio/afe/ |
H A D | iio-rescale.c | 364 u32 shunt; in rescale_current_sense_shunt_props() local 368 ret = device_property_read_u32(dev, "shunt-resistor-micro-ohms", in rescale_current_sense_shunt_props() 369 &shunt); in rescale_current_sense_shunt_props() 371 dev_err(dev, "failed to read the shunt resistance: %d\n", ret); in rescale_current_sense_shunt_props() 375 factor = gcd(shunt, 1000000); in rescale_current_sense_shunt_props() 377 rescale->denominator = shunt / factor; in rescale_current_sense_shunt_props() 509 { .compatible = "current-sense-shunt",
|
/kernel/linux/linux-5.10/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/ |
H A D | base.c | 50 u8 shunt_shift, u8 bus_reg, u8 bus_shift, u8 shunt, in nvkm_iccsense_poll_lane() 62 return vbus * vshunt * lsb / shunt; in nvkm_iccsense_poll_lane() 49 nvkm_iccsense_poll_lane(struct i2c_adapter *i2c, u8 addr, u8 shunt_reg, u8 shunt_shift, u8 bus_reg, u8 bus_shift, u8 shunt, u16 lsb) nvkm_iccsense_poll_lane() argument
|
/kernel/linux/linux-6.6/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/ |
H A D | base.c | 50 u8 shunt_shift, u8 bus_reg, u8 bus_shift, u8 shunt, in nvkm_iccsense_poll_lane() 62 return vbus * vshunt * lsb / shunt; in nvkm_iccsense_poll_lane() 49 nvkm_iccsense_poll_lane(struct i2c_adapter *i2c, u8 addr, u8 shunt_reg, u8 shunt_shift, u8 bus_reg, u8 bus_shift, u8 shunt, u16 lsb) nvkm_iccsense_poll_lane() argument
|