Lines Matching refs:channel
18 struct iio_channel *channel;
34 ret = iio_read_channel_processed(bat->channel, &val->intval);
44 ret = iio_read_channel_processed(bat->channel, &val->intval);
58 /* Set the most appropriate IIO channel voltage reference scale
67 ret = iio_read_max_channel_raw(bat->channel, &max_raw);
69 dev_err(bat->dev, "Unable to read max raw channel value\n");
73 ret = iio_read_avail_channel_attribute(bat->channel, &scale_raw,
77 dev_err(bat->dev, "Unable to read channel avail scale\n");
105 ret = iio_write_channel_attribute(bat->channel,
136 bat->channel = devm_iio_channel_get(dev, "battery");
137 if (IS_ERR(bat->channel))
138 return PTR_ERR(bat->channel);