Lines Matching refs:thermistor

583 	struct ltc2983_thermistor *thermistor = to_thermistor(sensor);  in ltc2983_thermistor_assign_chan()  local
586 chan_val = LTC2983_CHAN_ASSIGN(thermistor->r_sense_chan); in ltc2983_thermistor_assign_chan()
587 chan_val |= LTC2983_THERMISTOR_CFG(thermistor->sensor_config); in ltc2983_thermistor_assign_chan()
589 LTC2983_THERMISTOR_EXC_CURRENT(thermistor->excitation_current); in ltc2983_thermistor_assign_chan()
591 if (thermistor->custom) { in ltc2983_thermistor_assign_chan()
595 thermistor->custom, in ltc2983_thermistor_assign_chan()
922 struct ltc2983_thermistor *thermistor; in ltc2983_thermistor_new() local
928 thermistor = devm_kzalloc(dev, sizeof(*thermistor), GFP_KERNEL); in ltc2983_thermistor_new()
929 if (!thermistor) in ltc2983_thermistor_new()
938 ret = fwnode_property_read_u32(ref, "reg", &thermistor->r_sense_chan); in ltc2983_thermistor_new()
945 thermistor->sensor_config = LTC2983_THERMISTOR_SGL(1); in ltc2983_thermistor_new()
949 thermistor->sensor_config = in ltc2983_thermistor_new()
952 thermistor->sensor_config = in ltc2983_thermistor_new()
956 if (!(thermistor->sensor_config & LTC2983_THERMISTOR_DIFF_MASK) && in ltc2983_thermistor_new()
977 thermistor->custom = __ltc2983_custom_sensor_new(st, child, in ltc2983_thermistor_new()
981 if (IS_ERR(thermistor->custom)) { in ltc2983_thermistor_new()
982 ret = PTR_ERR(thermistor->custom); in ltc2983_thermistor_new()
987 thermistor->sensor.fault_handler = ltc2983_common_fault_handler; in ltc2983_thermistor_new()
988 thermistor->sensor.assign_chan = ltc2983_thermistor_assign_chan; in ltc2983_thermistor_new()
996 thermistor->excitation_current = 0x03; in ltc2983_thermistor_new()
999 thermistor->excitation_current = 0x0c; in ltc2983_thermistor_new()
1011 thermistor->excitation_current = 0x0c; in ltc2983_thermistor_new()
1014 thermistor->excitation_current = 0x01; in ltc2983_thermistor_new()
1017 thermistor->excitation_current = 0x02; in ltc2983_thermistor_new()
1020 thermistor->excitation_current = 0x03; in ltc2983_thermistor_new()
1023 thermistor->excitation_current = 0x04; in ltc2983_thermistor_new()
1026 thermistor->excitation_current = 0x05; in ltc2983_thermistor_new()
1029 thermistor->excitation_current = 0x06; in ltc2983_thermistor_new()
1032 thermistor->excitation_current = 0x07; in ltc2983_thermistor_new()
1035 thermistor->excitation_current = 0x08; in ltc2983_thermistor_new()
1038 thermistor->excitation_current = 0x09; in ltc2983_thermistor_new()
1041 thermistor->excitation_current = 0x0a; in ltc2983_thermistor_new()
1044 thermistor->excitation_current = 0x0b; in ltc2983_thermistor_new()
1056 return &thermistor->sensor; in ltc2983_thermistor_new()