Lines Matching refs:vals
593 int size, const int *vals)
601 return scnprintf(buf, len, "%d", vals[0]);
606 if (vals[1] < 0)
607 return scnprintf(buf, len, "-%d.%06u%s", abs(vals[0]),
608 -vals[1], scale_db ? " dB" : "");
610 return scnprintf(buf, len, "%d.%06u%s", vals[0], vals[1],
613 if (vals[1] < 0)
614 return scnprintf(buf, len, "-%d.%09u", abs(vals[0]),
615 -vals[1]);
617 return scnprintf(buf, len, "%d.%09u", vals[0], vals[1]);
619 tmp = div_s64((s64)vals[0] * 1000000000LL, vals[1]);
620 tmp1 = vals[1];
624 tmp = shift_right((s64)vals[0] * 1000000000LL, vals[1]);
633 l += scnprintf(&buf[l], len - l, "%d ", vals[i]);
640 return scnprintf(buf, len, "%c", (char)vals[0]);
652 * @size: Number of IIO value entries contained in vals
653 * @vals: Pointer to the values, exact meaning depends on the
660 ssize_t iio_format_value(char *buf, unsigned int type, int size, int *vals)
664 len = __iio_format_value(buf, PAGE_SIZE, type, size, vals);
678 int vals[INDIO_MAX_RAW_ELEMENTS];
685 vals, &val_len,
689 &vals[0], &vals[1], this_attr->address);
694 return iio_format_value(buf, ret, val_len, vals);
697 static ssize_t iio_format_avail_list(char *buf, const int *vals,
707 type, 1, &vals[i]);
723 type, 2, &vals[i * 2]);
740 static ssize_t iio_format_avail_range(char *buf, const int *vals, int type)
750 type, 1, &vals[i]);
766 type, 2, &vals[i * 2]);
789 const int *vals;
795 &vals, &type, &length,
802 return iio_format_avail_list(buf, vals, type, length);
804 return iio_format_avail_range(buf, vals, type);