Lines Matching refs:thermo
541 struct ltc2983_thermocouple *thermo = to_thermocouple(sensor); in ltc2983_thermocouple_assign_chan() local
544 chan_val = LTC2983_CHAN_ASSIGN(thermo->cold_junction_chan); in ltc2983_thermocouple_assign_chan()
545 chan_val |= LTC2983_THERMOCOUPLE_CFG(thermo->sensor_config); in ltc2983_thermocouple_assign_chan()
547 if (thermo->custom) { in ltc2983_thermocouple_assign_chan()
550 ret = __ltc2983_chan_custom_sensor_assign(st, thermo->custom, in ltc2983_thermocouple_assign_chan()
658 struct ltc2983_thermocouple *thermo; in ltc2983_thermocouple_new() local
663 thermo = devm_kzalloc(&st->spi->dev, sizeof(*thermo), GFP_KERNEL); in ltc2983_thermocouple_new()
664 if (!thermo) in ltc2983_thermocouple_new()
668 thermo->sensor_config = LTC2983_THERMOCOUPLE_SGL(1); in ltc2983_thermocouple_new()
674 thermo->sensor_config |= in ltc2983_thermocouple_new()
678 thermo->sensor_config |= in ltc2983_thermocouple_new()
682 thermo->sensor_config |= in ltc2983_thermocouple_new()
686 thermo->sensor_config |= in ltc2983_thermocouple_new()
695 thermo->sensor_config |= LTC2983_THERMOCOUPLE_OC_CHECK(1); in ltc2983_thermocouple_new()
698 if (!(thermo->sensor_config & LTC2983_THERMOCOUPLE_DIFF_MASK) && in ltc2983_thermocouple_new()
710 ret = fwnode_property_read_u32(ref, "reg", &thermo->cold_junction_chan); in ltc2983_thermocouple_new()
725 thermo->custom = __ltc2983_custom_sensor_new(st, child, in ltc2983_thermocouple_new()
728 if (IS_ERR(thermo->custom)) { in ltc2983_thermocouple_new()
729 ret = PTR_ERR(thermo->custom); in ltc2983_thermocouple_new()
735 thermo->sensor.fault_handler = ltc2983_thermocouple_fault_handler; in ltc2983_thermocouple_new()
736 thermo->sensor.assign_chan = ltc2983_thermocouple_assign_chan; in ltc2983_thermocouple_new()
739 return &thermo->sensor; in ltc2983_thermocouple_new()