Lines Matching refs:raw_val
144 long raw_val; in tps23861_read_voltage() local
159 raw_val = le16_to_cpu(regval); in tps23861_read_voltage()
160 *val = (FIELD_GET(VOLTAGE_CURRENT_MASK, raw_val) * VOLTAGE_LSB) / 1000; in tps23861_read_voltage()
168 long raw_val, current_lsb; in tps23861_read_current() local
184 raw_val = le16_to_cpu(regval); in tps23861_read_current()
185 *val = (FIELD_GET(VOLTAGE_CURRENT_MASK, raw_val) * current_lsb) / 1000000; in tps23861_read_current()
460 unsigned int raw_val; in tps23861_port_resistance() local
468 raw_val = le16_to_cpu(regval); in tps23861_port_resistance()
469 switch (FIELD_GET(PORT_RESISTANCE_RSN_MASK, raw_val)) { in tps23861_port_resistance()
471 return (FIELD_GET(PORT_RESISTANCE_MASK, raw_val) * RESISTANCE_LSB) / 10000; in tps23861_port_resistance()
473 return (FIELD_GET(PORT_RESISTANCE_MASK, raw_val) * RESISTANCE_LSB_LOW) / 10000; in tps23861_port_resistance()