Selaa lähdekoodia

iio: Make IIO value formating function globally available.

Make IIO value formating function globally available to allow IIO drivers
to output values as the core does.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Andrew F. Davis 9 vuotta sitten
vanhempi
commit
7d2c2acac5
2 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. 1 0
      drivers/iio/industrialio-core.c
  2. 2 0
      include/linux/iio/iio.h

+ 1 - 0
drivers/iio/industrialio-core.c

@@ -470,6 +470,7 @@ ssize_t iio_format_value(char *buf, unsigned int type, int size, int *vals)
 		return 0;
 	}
 }
+EXPORT_SYMBOL_GPL(iio_format_value);
 
 static ssize_t iio_read_channel_info(struct device *dev,
 				     struct device_attribute *attr,

+ 2 - 0
include/linux/iio/iio.h

@@ -636,6 +636,8 @@ static inline struct dentry *iio_get_debugfs_dentry(struct iio_dev *indio_dev)
 }
 #endif
 
+ssize_t iio_format_value(char *buf, unsigned int type, int size, int *vals);
+
 int iio_str_to_fixpoint(const char *str, int fract_mult, int *integer,
 	int *fract);