1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2018 Axentia Technologies AB
6 #ifndef __IIO_RESCALE_H__
7 #define __IIO_RESCALE_H__
9 #include <linux/types.h>
10 #include <linux/iio/iio.h>
16 enum iio_chan_type type;
17 int (*props)(struct device *dev, struct rescale *rescale);
21 const struct rescale_cfg *cfg;
22 struct iio_channel *source;
23 struct iio_chan_spec chan;
24 struct iio_chan_spec_ext_info *ext_info;
31 int rescale_process_scale(struct rescale *rescale, int scale_type,
33 int rescale_process_offset(struct rescale *rescale, int scale_type,
34 int scale, int scale2, int schan_off,
36 #endif /* __IIO_RESCALE_H__ */