iio: Factor IIO value formating into its own function

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
diff --git a/drivers/iio/iio_core.h b/drivers/iio/iio_core.h
index 9939917..f6db6af 100644
--- a/drivers/iio/iio_core.h
+++ b/drivers/iio/iio_core.h
@@ -35,6 +35,8 @@
 			   struct list_head *attr_list);
 void iio_free_chan_devattr_list(struct list_head *attr_list);
 
+ssize_t iio_format_value(char *buf, unsigned int type, int val, int val2);
+
 /* Event interface flags */
 #define IIO_BUSY_BIT_POS 1