aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/iio
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2012-11-20 08:36:00 -0500
committerJonathan Cameron <jic23@kernel.org>2012-11-20 16:26:39 -0500
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)
620}; 620};
621#endif 621#endif
622 622
623int iio_str_to_fixpoint(const char *str, int fract_mult, int *integer,
624 int *fract);
625
623/** 626/**
624 * IIO_DEGREE_TO_RAD() - Convert degree to rad 627 * IIO_DEGREE_TO_RAD() - Convert degree to rad
625 * @deg: A value in degree 628 * @deg: A value in degree