Searched refs:rsense_mohms (Results 1 – 3 of 3) sorted by relevance
66 static int current_to_ma(uint16_t rsense_mohms, int16_t val) in current_to_ma() argument68 return (int32_t)val * 25 / rsense_mohms / 16; /* * 1.5625 */ in current_to_ma()78 static int current_ma_to_max17055(uint16_t rsense_mohms, uint16_t val) in current_ma_to_max17055() argument80 return (int32_t)val * rsense_mohms * 16 / 25; /* / 1.5625 */ in current_ma_to_max17055()90 static int capacity_to_ma(unsigned int rsense_mohms, int16_t val) in capacity_to_ma() argument95 lsb_units = 5 * 1000 / rsense_mohms; in capacity_to_ma()109 static int capacity_to_max17055(unsigned int rsense_mohms, uint16_t val_mha) in capacity_to_max17055() argument111 return val_mha * rsense_mohms / 5; in capacity_to_max17055()172 current_ma = current_to_ma(config->rsense_mohms, priv->avg_current); in max17055_channel_get()185 tmp = capacity_to_ma(config->rsense_mohms, priv->full_cap); in max17055_channel_get()[all …]
75 uint16_t rsense_mohms; member
80 uint16_t rsense_mohms; member