Lines Matching full:diode
577 struct ltc2983_diode *diode = to_diode(sensor); in ltc2983_diode_assign_chan() local
580 chan_val = LTC2983_DIODE_CFG(diode->sensor_config); in ltc2983_diode_assign_chan()
581 chan_val |= LTC2983_DIODE_EXC_CURRENT(diode->excitation_current); in ltc2983_diode_assign_chan()
582 chan_val |= LTC2983_DIODE_IDEAL_FACTOR(diode->ideal_factor_value); in ltc2983_diode_assign_chan()
1021 struct ltc2983_diode *diode; in ltc2983_diode_new() local
1025 diode = devm_kzalloc(&st->spi->dev, sizeof(*diode), GFP_KERNEL); in ltc2983_diode_new()
1026 if (!diode) in ltc2983_diode_new()
1030 diode->sensor_config = LTC2983_DIODE_SGL(1); in ltc2983_diode_new()
1033 diode->sensor_config |= LTC2983_DIODE_3_CONV_CYCLE(1); in ltc2983_diode_new()
1036 diode->sensor_config |= LTC2983_DIODE_AVERAGE_ON(1); in ltc2983_diode_new()
1039 if (!(diode->sensor_config & LTC2983_DIODE_DIFF_MASK) && in ltc2983_diode_new()
1047 diode->sensor.fault_handler = ltc2983_common_fault_handler; in ltc2983_diode_new()
1048 diode->sensor.assign_chan = ltc2983_diode_assign_chan; in ltc2983_diode_new()
1055 diode->excitation_current = 0x00; in ltc2983_diode_new()
1058 diode->excitation_current = 0x01; in ltc2983_diode_new()
1061 diode->excitation_current = 0x02; in ltc2983_diode_new()
1064 diode->excitation_current = 0x03; in ltc2983_diode_new()
1077 diode->ideal_factor_value = __convert_to_raw(temp, 1048576); in ltc2983_diode_new()
1079 return &diode->sensor; in ltc2983_diode_new()