static int max517_write_raw(struct iio_dev *indio_dev, struct iio_chan_spec const *chan, int val, int val2, long mask) { int ret; switch (mask) { case IIO_CHAN_INFO_RAW: ret = max517_set_value(indio_dev, val, chan->channel); break; default: ret = -EINVAL; break; } return ret; }
static ssize_t max517_set_value_1(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { return max517_set_value(dev, attr, buf, count, 1); }