[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251027143850.2070427-7-andriy.shevchenko@linux.intel.com>
Date: Mon, 27 Oct 2025 15:34:55 +0100
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
linux-iio@...r.kernel.org,
chrome-platform@...ts.linux.dev,
linux-kernel@...r.kernel.org,
linux-media@...r.kernel.org
Cc: Jonathan Cameron <jic23@...nel.org>,
David Lechner <dlechner@...libre.com>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>,
Benson Leung <bleung@...omium.org>,
Guenter Roeck <groeck@...omium.org>,
Lars-Peter Clausen <lars@...afoo.de>,
Michael Hennerich <Michael.Hennerich@...log.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
"Daniel W. S. Almeida" <dwlsalmeida@...il.com>
Subject: [PATCH v1 6/6] iio: position: iqs624-pos: Convert to use PI definition
Convert to use PI definition instead of open coded value of it.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.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
Powered by blists - more mailing lists