Lines Matching full:thermistor
112 /* cold junction for thermocouples and rsense for rtd's and thermistor's */
545 struct ltc2983_thermistor *thermistor = to_thermistor(sensor); in ltc2983_thermistor_assign_chan() local
548 chan_val = LTC2983_CHAN_ASSIGN(thermistor->r_sense_chan); in ltc2983_thermistor_assign_chan()
549 chan_val |= LTC2983_THERMISTOR_CFG(thermistor->sensor_config); in ltc2983_thermistor_assign_chan()
551 LTC2983_THERMISTOR_EXC_CURRENT(thermistor->excitation_current); in ltc2983_thermistor_assign_chan()
553 if (thermistor->custom) { in ltc2983_thermistor_assign_chan()
557 thermistor->custom, in ltc2983_thermistor_assign_chan()
869 struct ltc2983_thermistor *thermistor; in ltc2983_thermistor_new() local
875 thermistor = devm_kzalloc(dev, sizeof(*thermistor), GFP_KERNEL); in ltc2983_thermistor_new()
876 if (!thermistor) in ltc2983_thermistor_new()
885 ret = of_property_read_u32(phandle, "reg", &thermistor->r_sense_chan); in ltc2983_thermistor_new()
892 thermistor->sensor_config = LTC2983_THERMISTOR_SGL(1); in ltc2983_thermistor_new()
896 thermistor->sensor_config = in ltc2983_thermistor_new()
899 thermistor->sensor_config = in ltc2983_thermistor_new()
903 if (!(thermistor->sensor_config & LTC2983_THERMISTOR_DIFF_MASK) && in ltc2983_thermistor_new()
906 "Invalid chann:%d for differential thermistor", in ltc2983_thermistor_new()
921 propname = "adi,custom-thermistor"; in ltc2983_thermistor_new()
924 thermistor->custom = __ltc2983_custom_sensor_new(st, child, in ltc2983_thermistor_new()
928 if (IS_ERR(thermistor->custom)) { in ltc2983_thermistor_new()
930 return ERR_CAST(thermistor->custom); in ltc2983_thermistor_new()
934 thermistor->sensor.fault_handler = ltc2983_common_fault_handler; in ltc2983_thermistor_new()
935 thermistor->sensor.assign_chan = ltc2983_thermistor_assign_chan; in ltc2983_thermistor_new()
943 thermistor->excitation_current = 0x03; in ltc2983_thermistor_new()
946 thermistor->excitation_current = 0x0c; in ltc2983_thermistor_new()
958 thermistor->excitation_current = 0x0c; in ltc2983_thermistor_new()
961 thermistor->excitation_current = 0x01; in ltc2983_thermistor_new()
964 thermistor->excitation_current = 0x02; in ltc2983_thermistor_new()
967 thermistor->excitation_current = 0x03; in ltc2983_thermistor_new()
970 thermistor->excitation_current = 0x04; in ltc2983_thermistor_new()
973 thermistor->excitation_current = 0x05; in ltc2983_thermistor_new()
976 thermistor->excitation_current = 0x06; in ltc2983_thermistor_new()
979 thermistor->excitation_current = 0x07; in ltc2983_thermistor_new()
982 thermistor->excitation_current = 0x08; in ltc2983_thermistor_new()
985 thermistor->excitation_current = 0x09; in ltc2983_thermistor_new()
988 thermistor->excitation_current = 0x0a; in ltc2983_thermistor_new()
991 thermistor->excitation_current = 0x0b; in ltc2983_thermistor_new()
1003 return &thermistor->sensor; in ltc2983_thermistor_new()
1035 "Invalid chann:%d for differential thermistor", in ltc2983_diode_new()