Lines Matching refs:val
117 static int _ad5761_spi_write(struct ad5761_state *st, u8 addr, u16 val)
119 st->data[0].d32 = cpu_to_be32(AD5761_ADDR(addr) | val);
124 static int ad5761_spi_write(struct iio_dev *indio_dev, u8 addr, u16 val)
130 ret = _ad5761_spi_write(st, addr, val);
136 static int _ad5761_spi_read(struct ad5761_state *st, u8 addr, u16 *val)
158 *val = be32_to_cpu(st->data[2].d32);
163 static int ad5761_spi_read(struct iio_dev *indio_dev, u8 addr, u16 *val)
169 ret = _ad5761_spi_read(st, addr, val);
201 int *val,
214 *val = aux >> chan->scan_type.shift;
218 *val = st->vref * ad5761_range_params[st->range].m;
219 *val /= 10;
224 *val = -(1 << chan->scan_type.realbits);
225 *val *= ad5761_range_params[st->range].c;
226 *val /= ad5761_range_params[st->range].m;
235 int val,
244 if (val2 || (val << chan->scan_type.shift) > 0xffff || val < 0)
247 aux = val << chan->scan_type.shift;