Lines Matching full:rsense
32 #define MAX1721X_REG_NRSENSE 0x1CF /* RSense in 10^-5 Ohm */
65 unsigned int rsense; /* in tenths uOhm */ member
108 * RSense stored in 10^-5 Ohm, so measurement voltage must be
174 /* We need signed current, so must cast info->rsense to signed type */ in max1721x_battery_get_property()
178 max172xx_current_to_voltage(reg) / (int)info->rsense; in max1721x_battery_get_property()
183 max172xx_current_to_voltage(reg) / (int)info->rsense; in max1721x_battery_get_property()
367 /* rsense init */ in devm_w1_max1721x_add_device()
368 info->rsense = 0; in devm_w1_max1721x_add_device()
369 if (regmap_read(info->regmap, MAX1721X_REG_NRSENSE, &info->rsense)) { in devm_w1_max1721x_add_device()
370 dev_err(info->w1_dev, "Can't read RSense. Hardware error.\n"); in devm_w1_max1721x_add_device()
374 if (!info->rsense) { in devm_w1_max1721x_add_device()
375 dev_warn(info->w1_dev, "RSense not calibrated, set 10 mOhms!\n"); in devm_w1_max1721x_add_device()
376 info->rsense = 1000; /* in regs in 10^-5 */ in devm_w1_max1721x_add_device()
378 dev_info(info->w1_dev, "RSense: %d mOhms.\n", info->rsense / 100); in devm_w1_max1721x_add_device()