Lines Matching defs:chan
32 const struct iio_chan_spec *chan;
38 chan = xadc_event_to_channel(indio_dev, event);
40 if (chan->type == IIO_TEMP) {
46 IIO_UNMOD_EVENT_CODE(chan->type, chan->channel,
56 IIO_UNMOD_EVENT_CODE(chan->type, chan->channel,
70 static unsigned int xadc_get_threshold_offset(const struct iio_chan_spec *chan,
75 if (chan->type == IIO_TEMP) {
78 if (chan->channel < 2)
79 offset = chan->channel + 1;
81 offset = chan->channel + 6;
90 static unsigned int xadc_get_alarm_mask(const struct iio_chan_spec *chan)
92 if (chan->type == IIO_TEMP)
94 switch (chan->channel) {
114 const struct iio_chan_spec *chan, enum iio_event_type type,
119 return (bool)(xadc->alarm_mask & xadc_get_alarm_mask(chan));
123 const struct iio_chan_spec *chan, enum iio_event_type type,
126 unsigned int alarm = xadc_get_alarm_mask(chan);
162 const struct iio_chan_spec *chan, enum iio_event_type type,
166 unsigned int offset = xadc_get_threshold_offset(chan, dir);
186 const struct iio_chan_spec *chan, enum iio_event_type type,
190 unsigned int offset = xadc_get_threshold_offset(chan, dir);
213 if (chan->type == IIO_TEMP) {