Lines Matching full:diode
607 struct ltc2983_diode *diode = to_diode(sensor); in ltc2983_diode_assign_chan() local
610 chan_val = LTC2983_DIODE_CFG(diode->sensor_config); in ltc2983_diode_assign_chan()
611 chan_val |= LTC2983_DIODE_EXC_CURRENT(diode->excitation_current); in ltc2983_diode_assign_chan()
612 chan_val |= LTC2983_DIODE_IDEAL_FACTOR(diode->ideal_factor_value); in ltc2983_diode_assign_chan()
1019 struct ltc2983_diode *diode; in ltc2983_diode_new() local
1023 diode = devm_kzalloc(&st->spi->dev, sizeof(*diode), GFP_KERNEL); in ltc2983_diode_new()
1024 if (!diode) in ltc2983_diode_new()
1028 diode->sensor_config = LTC2983_DIODE_SGL(1); in ltc2983_diode_new()
1031 diode->sensor_config |= LTC2983_DIODE_3_CONV_CYCLE(1); in ltc2983_diode_new()
1034 diode->sensor_config |= LTC2983_DIODE_AVERAGE_ON(1); in ltc2983_diode_new()
1037 if (!(diode->sensor_config & LTC2983_DIODE_DIFF_MASK) && in ltc2983_diode_new()
1044 diode->sensor.fault_handler = ltc2983_common_fault_handler; in ltc2983_diode_new()
1045 diode->sensor.assign_chan = ltc2983_diode_assign_chan; in ltc2983_diode_new()
1052 diode->excitation_current = 0x00; in ltc2983_diode_new()
1055 diode->excitation_current = 0x01; in ltc2983_diode_new()
1058 diode->excitation_current = 0x02; in ltc2983_diode_new()
1061 diode->excitation_current = 0x03; in ltc2983_diode_new()
1073 diode->ideal_factor_value = __convert_to_raw(temp, 1048576); in ltc2983_diode_new()
1075 return &diode->sensor; in ltc2983_diode_new()