Lines Matching defs:index
99 * __of_iio_simple_xlate - translate iiospec to the IIO channel index
105 * whether IIO index is less than num_channels (that is specified in the
115 dev_err(&indio_dev->dev, "invalid channel index %u\n",
124 struct device_node *np, int index)
133 index, &iiospec);
147 index = indio_dev->info->of_xlate(indio_dev, &iiospec);
149 index = __of_iio_simple_xlate(indio_dev, &iiospec);
151 if (index < 0)
153 channel->channel = &indio_dev->channels[index];
159 return index;
162 static struct iio_channel *of_iio_channel_get(struct device_node *np, int index)
167 if (index < 0)
174 err = __of_iio_channel_get(channel, np, index);
192 int index = 0;
197 * index will be an error code, and of_iio_channel_get()
201 index = of_property_match_string(np, "io-channel-names",
203 chan = of_iio_channel_get(np, index);
206 else if (name && index >= 0) {
208 np, name ? name : "", index);