summaryrefslogtreecommitdiff
path: root/include/linux/iio
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2012-11-20 13:36:00 +0000
committerJonathan Cameron <jic23@kernel.org>2012-11-20 21:26:39 +0000
commit6807d7211327dbdd8df3692f3d26ca711514ba71 (patch)
tree3654bb4d0d6b2d9afd6534b3907f924c3d5e069d /include/linux/iio
parentc4f0c6936762ecd6b453275611a785dfdee0d417 (diff)
iio: Factor out fixed point number parsing into its own function
Factor out the code for parsing fixed point numbers into its own function and make this function globally available. This allows us to reuse the code to parse fixed point numbers in individual IIO drivers. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'include/linux/iio')
-rw-r--r--include/linux/iio/iio.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
index adca93a999a7..da8c776ba0bd 100644
--- a/include/linux/iio/iio.h
+++ b/include/linux/iio/iio.h
@@ -620,6 +620,9 @@ static inline struct dentry *iio_get_debugfs_dentry(struct iio_dev *indio_dev)
};
#endif
+int iio_str_to_fixpoint(const char *str, int fract_mult, int *integer,
+ int *fract);
+
/**
* IIO_DEGREE_TO_RAD() - Convert degree to rad
* @deg: A value in degree