Lines Matching full:diode
606 struct ltc2983_diode *diode = to_diode(sensor); in ltc2983_diode_assign_chan() local
609 chan_val = LTC2983_DIODE_CFG(diode->sensor_config); in ltc2983_diode_assign_chan()
610 chan_val |= LTC2983_DIODE_EXC_CURRENT(diode->excitation_current); in ltc2983_diode_assign_chan()
611 chan_val |= LTC2983_DIODE_IDEAL_FACTOR(diode->ideal_factor_value); in ltc2983_diode_assign_chan()
1066 struct ltc2983_diode *diode; in ltc2983_diode_new() local
1070 diode = devm_kzalloc(&st->spi->dev, sizeof(*diode), GFP_KERNEL); in ltc2983_diode_new()
1071 if (!diode) in ltc2983_diode_new()
1075 diode->sensor_config = LTC2983_DIODE_SGL(1); in ltc2983_diode_new()
1078 diode->sensor_config |= LTC2983_DIODE_3_CONV_CYCLE(1); in ltc2983_diode_new()
1081 diode->sensor_config |= LTC2983_DIODE_AVERAGE_ON(1); in ltc2983_diode_new()
1084 if (!(diode->sensor_config & LTC2983_DIODE_DIFF_MASK) && in ltc2983_diode_new()
1092 diode->sensor.fault_handler = ltc2983_common_fault_handler; in ltc2983_diode_new()
1093 diode->sensor.assign_chan = ltc2983_diode_assign_chan; in ltc2983_diode_new()
1100 diode->excitation_current = 0x00; in ltc2983_diode_new()
1103 diode->excitation_current = 0x01; in ltc2983_diode_new()
1106 diode->excitation_current = 0x02; in ltc2983_diode_new()
1109 diode->excitation_current = 0x03; in ltc2983_diode_new()
1122 diode->ideal_factor_value = __convert_to_raw(temp, 1048576); in ltc2983_diode_new()
1124 return &diode->sensor; in ltc2983_diode_new()