linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: staging: iio: frequency: ad9832.h: Fixed TODO note.
@ 2025-06-27 17:51 Abdalla Al-Dalleh
  2025-06-27 18:35 ` Andy Shevchenko
  2025-06-28  6:08 ` Greg Kroah-Hartman
  0 siblings, 2 replies; 8+ messages in thread
From: Abdalla Al-Dalleh @ 2025-06-27 17:51 UTC (permalink / raw)
  To: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	David Lechner, Nuno Sá, Andy Shevchenko, Greg Kroah-Hartman,
	Gabriel Shahrouzi, Abdalla Al-Dalleh, open list,
	open list:IIO SUBSYSTEM AND DRIVERS, open list:STAGING SUBSYSTEM

- 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@sesame.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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-06-28 15:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-27 17:51 [PATCH] drivers: staging: iio: frequency: ad9832.h: Fixed TODO note Abdalla Al-Dalleh
2025-06-27 18:35 ` Andy Shevchenko
2025-06-27 19:29   ` Abdalla Ahmad
2025-06-27 19:45     ` Dan Carpenter
2025-06-27 20:32     ` David Lechner
2025-06-28 15:12       ` Jonathan Cameron
2025-06-28  6:08 ` Greg Kroah-Hartman
2025-06-28 15:10   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).