Lines Matching defs:vals
635 int size, const int *vals)
643 return sysfs_emit_at(buf, offset, "%d", vals[0]);
648 if (vals[1] < 0)
650 abs(vals[0]), -vals[1],
653 return sysfs_emit_at(buf, offset, "%d.%06u%s", vals[0],
654 vals[1], scale_db ? " dB" : "");
656 if (vals[1] < 0)
658 abs(vals[0]), -vals[1]);
660 return sysfs_emit_at(buf, offset, "%d.%09u", vals[0],
661 vals[1]);
663 tmp2 = div_s64((s64)vals[0] * 1000000000LL, vals[1]);
664 tmp1 = vals[1];
672 tmp2 = shift_right((s64)vals[0] * 1000000000LL, vals[1]);
685 l += sysfs_emit_at(buf, offset + l, "%d ", vals[i]);
689 return sysfs_emit_at(buf, offset, "%c", (char)vals[0]);
691 tmp2 = (s64)((((u64)vals[1]) << 32) | (u32)vals[0]);
704 * @size: Number of IIO value entries contained in vals
705 * @vals: Pointer to the values, exact meaning depends on the
712 ssize_t iio_format_value(char *buf, unsigned int type, int size, int *vals)
716 len = __iio_format_value(buf, 0, type, size, vals);
746 int vals[INDIO_MAX_RAW_ELEMENTS];
753 vals, &val_len,
757 &vals[0], &vals[1], this_attr->address);
762 return iio_format_value(buf, ret, val_len, vals);
765 static ssize_t iio_format_list(char *buf, const int *vals, int type, int length,
790 len += __iio_format_value(buf, len, type, stride, &vals[i]);
800 static ssize_t iio_format_avail_list(char *buf, const int *vals,
804 return iio_format_list(buf, vals, type, length, "", "");
807 static ssize_t iio_format_avail_range(char *buf, const int *vals, int type)
825 return iio_format_list(buf, vals, type, length, "[", "]");
834 const int *vals;
840 &vals, &type, &length,
847 return iio_format_avail_list(buf, vals, type, length);
849 return iio_format_avail_range(buf, vals, type);