[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250627175114.548076-1-abdalla.ahmad@sesame.org.jo>
Date: Fri, 27 Jun 2025 20:51:14 +0300
From: Abdalla Al-Dalleh <abdalla.ahmad@...ame.org.jo>
To: Lars-Peter Clausen <lars@...afoo.de>,
Michael Hennerich <Michael.Hennerich@...log.com>,
Jonathan Cameron <jic23@...nel.org>,
David Lechner <dlechner@...libre.com>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Gabriel Shahrouzi <gshahrouzi@...il.com>,
Abdalla Al-Dalleh <abdalla.ahmad@...ame.org.jo>,
linux-kernel@...r.kernel.org (open list),
linux-iio@...r.kernel.org (open list:IIO SUBSYSTEM AND DRIVERS),
linux-staging@...ts.linux.dev (open list:STAGING SUBSYSTEM)
Subject: [PATCH] drivers: staging: iio: frequency: ad9832.h: Fixed TODO note.
- drivers/staging/iio/frequency/ad9832.c: Changed .h file location
- drivers/staging/iio/frequency/ad9832.h: Removed struct definition
- include/linux/iio/dac/ad9832.h: Added header file according to the
TODO note.
Signed-off-by: Abdalla Al-Dalleh <abdalla.ahmad@...ame.org.jo>
---
drivers/staging/iio/frequency/ad9832.c | 3 +--
drivers/staging/iio/frequency/ad9832.h | 23 ------------------
include/linux/iio/dac/ad9832.h | 33 ++++++++++++++++++++++++++
3 files changed, 34 insertions(+), 25 deletions(-)
create mode 100644 include/linux/iio/dac/ad9832.h
diff --git a/drivers/staging/iio/frequency/ad9832.c b/drivers/staging/iio/frequency/ad9832.c
index 49388da5a684..4c7d618b2572 100644
--- a/drivers/staging/iio/frequency/ad9832.c
+++ b/drivers/staging/iio/frequency/ad9832.c
@@ -22,8 +22,7 @@
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
-
-#include "ad9832.h"
+#include <linux/iio/dac/ad9832.h>
#include "dds.h"
diff --git a/drivers/staging/iio/frequency/ad9832.h b/drivers/staging/iio/frequency/ad9832.h
index d0d840edb8d2..a0819042a81e 100644
--- a/drivers/staging/iio/frequency/ad9832.h
+++ b/drivers/staging/iio/frequency/ad9832.h
@@ -7,27 +7,4 @@
#ifndef IIO_DDS_AD9832_H_
#define IIO_DDS_AD9832_H_
-/*
- * TODO: struct ad9832_platform_data needs to go into include/linux/iio
- */
-
-/**
- * struct ad9832_platform_data - platform specific information
- * @freq0: power up freq0 tuning word in Hz
- * @freq1: power up freq1 tuning word in Hz
- * @phase0: power up phase0 value [0..4095] correlates with 0..2PI
- * @phase1: power up phase1 value [0..4095] correlates with 0..2PI
- * @phase2: power up phase2 value [0..4095] correlates with 0..2PI
- * @phase3: power up phase3 value [0..4095] correlates with 0..2PI
- */
-
-struct ad9832_platform_data {
- unsigned long freq0;
- unsigned long freq1;
- unsigned short phase0;
- unsigned short phase1;
- unsigned short phase2;
- unsigned short phase3;
-};
-
#endif /* IIO_DDS_AD9832_H_ */
diff --git a/include/linux/iio/dac/ad9832.h b/include/linux/iio/dac/ad9832.h
new file mode 100644
index 000000000000..8259a0b0f981
--- /dev/null
+++ b/include/linux/iio/dac/ad9832.h
@@ -0,0 +1,33 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * AD9832 SPI DDS driver
+ *
+ * Copyright 2011 Analog Devices Inc.
+ */
+#ifndef IIO_DDS_AD9832_H_
+#define IIO_DDS_AD9832_H_
+
+/*
+ * struct ad9832_platform_data moved from drivers/staging/iio/frequency/
+ */
+
+/**
+ * struct ad9832_platform_data - platform specific information
+ * @freq0: power up freq0 tuning word in Hz
+ * @freq1: power up freq1 tuning word in Hz
+ * @phase0: power up phase0 value [0..4095] correlates with 0..2PI
+ * @phase1: power up phase1 value [0..4095] correlates with 0..2PI
+ * @phase2: power up phase2 value [0..4095] correlates with 0..2PI
+ * @phase3: power up phase3 value [0..4095] correlates with 0..2PI
+ */
+
+struct ad9832_platform_data {
+ unsigned long freq0;
+ unsigned long freq1;
+ unsigned short phase0;
+ unsigned short phase1;
+ unsigned short phase2;
+ unsigned short phase3;
+};
+
+#endif /* IIO_DDS_AD9832_H_ */
--
2.43.0
Powered by blists - more mailing lists