[PATCH v1 6/6] iio: position: iqs624-pos: Convert to use PI definition

Andy Shevchenko
2025-10-27T14:39:01Z

Convert to use PI definition instead of open coded value of it.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/iio/position/iqs624-pos.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/iio/position/iqs624-pos.c b/drivers/iio/position/iqs624-pos.c
index 8239239c6ee2..da432d1b515c 100644
--- a/drivers/iio/position/iqs624-pos.c
+++ b/drivers/iio/position/iqs624-pos.c
@@ -15,10 +15,11 @@
#include <linux/notifier.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
+#include <linux/units.h>

#define IQS624_POS_DEG_OUT 0x16

-#define IQS624_POS_SCALE1 (314159 / 180)
+#define IQS624_POS_SCALE1 DIV_ROUND_UP_ULL(PI, 1800000)
#define IQS624_POS_SCALE2 100000

struct iqs624_pos_private {
--
2.50.1