Lines Matching defs:chan
299 struct iio_chan_spec const *chan, int val, int val2, long mask)
307 if (val >= (1 << chan->scan_type.realbits) || val < 0)
310 if (!chan->output)
314 ret = st->ops->write_dac(st, chan->channel, val);
316 st->cached_dac[chan->channel] = val;
320 if (chan->type == IIO_VOLTAGE) {
341 if (chan->output) {
372 struct iio_chan_spec const *chan,
381 if (!chan->output) {
383 ret = st->ops->read_adc(st, chan->channel, &read_val);
388 if ((read_val >> 12 & 0x7) != (chan->channel & 0x7)) {
390 chan->channel);
398 read_val = st->cached_dac[chan->channel];
403 chan->channel, read_val);
410 if (chan->type == IIO_TEMP) {
419 if (chan->output)
430 *val2 = chan->scan_type.realbits;
452 struct iio_chan_spec const *chan, long mask)
473 const struct iio_chan_spec *chan,
493 struct iio_chan_spec *chan, bool output, unsigned id)
495 chan->type = IIO_VOLTAGE;
496 chan->indexed = 1;
497 chan->output = output;
498 chan->channel = id;
499 chan->info_mask_separate = BIT(IIO_CHAN_INFO_RAW);
500 chan->info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE);
501 chan->scan_type.sign = 'u';
502 chan->scan_type.realbits = 12;
503 chan->scan_type.storagebits = 16;
504 chan->ext_info = ad5592r_ext_info;