Lines Matching refs:offset
74 unsigned int offset; in xadc_get_threshold_offset() local
77 offset = XADC_THRESHOLD_OT_MAX; in xadc_get_threshold_offset()
80 offset = chan->channel + 1; in xadc_get_threshold_offset()
82 offset = chan->channel + 6; in xadc_get_threshold_offset()
86 offset += 4; in xadc_get_threshold_offset()
88 return offset; in xadc_get_threshold_offset()
169 unsigned int offset = xadc_get_threshold_offset(chan, dir); in xadc_read_event_value() local
174 *val = xadc->threshold[offset]; in xadc_read_event_value()
193 unsigned int offset = xadc_get_threshold_offset(chan, dir); in xadc_write_event_value() local
206 xadc->threshold[offset] = val; in xadc_write_event_value()
230 if (xadc->threshold[offset] < xadc->temp_hysteresis) in xadc_write_event_value()
231 xadc->threshold[offset + 4] = 0; in xadc_write_event_value()
233 xadc->threshold[offset + 4] = xadc->threshold[offset] - in xadc_write_event_value()
235 ret = _xadc_write_adc_reg(xadc, XADC_REG_THRESHOLD(offset + 4), in xadc_write_event_value()
236 xadc->threshold[offset + 4]); in xadc_write_event_value()
242 ret = _xadc_write_adc_reg(xadc, XADC_REG_THRESHOLD(offset), val); in xadc_write_event_value()