Lines Matching refs:ads8688_range_def

89 static const struct ads8688_ranges ads8688_range_def[5] = {  variable
124 ads8688_range_def[0].scale * st->vref_mv, in ads8688_show_scales()
125 ads8688_range_def[1].scale * st->vref_mv, in ads8688_show_scales()
126 ads8688_range_def[2].scale * st->vref_mv); in ads8688_show_scales()
132 return sprintf(buf, "%d %d\n", ads8688_range_def[0].offset, in ads8688_show_offsets()
133 ads8688_range_def[3].offset); in ads8688_show_offsets()
263 scale_mv *= ads8688_range_def[st->range[chan->channel]].scale; in ads8688_read_raw()
269 offset = ads8688_range_def[st->range[chan->channel]].offset; in ads8688_read_raw()
302 offset = ads8688_range_def[st->range[chan->channel]].offset; in ads8688_write_raw()
303 if (offset == 0 && val2 == ads8688_range_def[0].scale * st->vref_mv) { in ads8688_write_raw()
309 for (i = 0; i < ARRAY_SIZE(ads8688_range_def); i++) in ads8688_write_raw()
310 if (val2 == ads8688_range_def[i].scale * st->vref_mv && in ads8688_write_raw()
311 offset == ads8688_range_def[i].offset) { in ads8688_write_raw()
313 ads8688_range_def[i].reg); in ads8688_write_raw()
322 if (!(ads8688_range_def[0].offset == val || in ads8688_write_raw()
323 ads8688_range_def[3].offset == val)) { in ads8688_write_raw()
338 scale = ads8688_range_def[st->range[chan->channel]].scale; in ads8688_write_raw()
341 for (i = 0; i < ARRAY_SIZE(ads8688_range_def); i++) in ads8688_write_raw()
342 if (val == ads8688_range_def[i].offset && in ads8688_write_raw()
343 scale == ads8688_range_def[i].scale) { in ads8688_write_raw()
345 ads8688_range_def[i].reg); in ads8688_write_raw()
352 st->range[chan->channel] = ads8688_range_def[i].range; in ads8688_write_raw()