Skip to contentSkip to conversation

Remove ad9832.h and ad9834.h header files in drivers/staging/iio/frequency

PATCH Applied Taimoor Zaeem 3 participants 5 messages Oct 6, 2025 – Oct 12, 2025

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover Remove ad9832.h and ad9834.h header files in drivers/staging/iio/frequency

This patch series removes ad9832.h and ad9834.h header files.

PATCH 1/2: staging: iio: ad9834: remove empty ad9834.h file
PATCH 2/2: staging: iio: ad9832: move struct ad9832_platform_data to ad9832.c

 drivers/staging/iio/frequency/ad9832.c | 21 ++++++++++++++--
 drivers/staging/iio/frequency/ad9832.h | 33 --------------------------
 drivers/staging/iio/frequency/ad9834.c |  3 +--
 drivers/staging/iio/frequency/ad9834.h | 10 --------
 4 files changed, 20 insertions(+), 47 deletions(-)
 delete mode 100644 drivers/staging/iio/frequency/ad9832.h
 delete mode 100644 drivers/staging/iio/frequency/ad9834.h
Signature · 1 line
2.51.0
#1 lore raw

PATCH 1/2 staging: iio: ad9834: remove empty ad9834.h file

Remove drivers/staging/iio/frequency/ad9834.h header file because it contains nothing except the include guards.

---
 drivers/staging/iio/frequency/ad9834.c |  3 +--
 drivers/staging/iio/frequency/ad9834.h | 10 ----------
 2 files changed, 1 insertion(+), 12 deletions(-)
 delete mode 100644 drivers/staging/iio/frequency/ad9834.h
drivers/staging/iio/frequency/ad9834.c +1 -2
index 0038eb234d40..d339d5e8e043 100644
@@ -21,9 +21,8 @@
 
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
-#include "dds.h"
 
-#include "ad9834.h"
+#include "dds.h"
 
 /* Registers */
 
drivers/staging/iio/frequency/ad9834.h deleted +0 -10
deleted file mode 100644
index 521943aa0e61..000000000000
@@ -1,10 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * AD9833/AD9834/AD9837/AD9838 SPI DDS driver
- *
- * Copyright 2010-2011 Analog Devices Inc.
- */
-#ifndef IIO_DDS_AD9834_H_
-#define IIO_DDS_AD9834_H_
-
-#endif /* IIO_DDS_AD9834_H_ */
Signature · 1 line
2.51.0
maintainer Applied
#2 lore raw

Re: [PATCH 1/2] staging: iio: ad9834: remove empty ad9834.h file

Quoted 3 lines · On Mon, 6 Oct 2025 14:40:24 +0500 Taimoor Zaeem <[email protected]> wrote:

Remove drivers/staging/iio/frequency/ad9834.h header file because it contains nothing except the include guards.

Odd! I guess left over after some other cleanup at somepoint.

Applied.

Thanks for cleaning this up.

Jonathan

Quoted 38 lines
---
 drivers/staging/iio/frequency/ad9834.c |  3 +--
 drivers/staging/iio/frequency/ad9834.h | 10 ----------
 2 files changed, 1 insertion(+), 12 deletions(-)
 delete mode 100644 drivers/staging/iio/frequency/ad9834.h
drivers/staging/iio/frequency/ad9834.c +1 -2
index 0038eb234d40..d339d5e8e043 100644
@@ -21,9 +21,8 @@
 
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
-#include "dds.h"
 
-#include "ad9834.h"
+#include "dds.h"
 
 /* Registers */
 
drivers/staging/iio/frequency/ad9834.h deleted +0 -10
deleted file mode 100644
index 521943aa0e61..000000000000
@@ -1,10 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * AD9833/AD9834/AD9837/AD9838 SPI DDS driver
- *
- * Copyright 2010-2011 Analog Devices Inc.
- */
-#ifndef IIO_DDS_AD9834_H_
-#define IIO_DDS_AD9834_H_
-
-#endif /* IIO_DDS_AD9834_H_ */
#3 lore raw

PATCH 2/2 staging: iio: ad9832: move struct ad9832_platform_data to ad9832.c

In reply to Taimoor Zaeem

The struct ad9832_platform_data is only used in ad9832.c so it moved there instead. With this change, the ad9832.h file becomes empty, so we can remove it.

---
 drivers/staging/iio/frequency/ad9832.c | 21 ++++++++++++++--
 drivers/staging/iio/frequency/ad9832.h | 33 --------------------------
 2 files changed, 19 insertions(+), 35 deletions(-)
 delete mode 100644 drivers/staging/iio/frequency/ad9832.h
drivers/staging/iio/frequency/ad9832.c +19 -2
index 49388da5a684..0517858bc5da 100644
@@ -23,8 +23,6 @@
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
 
-#include "ad9832.h"
-
 #include "dds.h"
 
 /* Registers */
@@ -117,6 +115,25 @@ struct ad9832_state {
 	} __aligned(IIO_DMA_MINALIGN);
 };
 
+/**
+ * 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;
+};
+
 static unsigned long ad9832_calc_freqreg(unsigned long mclk, unsigned long fout)
 {
 	unsigned long long freqreg = (u64)fout *
drivers/staging/iio/frequency/ad9832.h deleted +0 -33
deleted file mode 100644
index d0d840edb8d2..000000000000
@@ -1,33 +0,0 @@
-/* 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_
-
-/*
- * 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_ */
Signature · 1 line
2.51.0
#4 lore raw

Re: [PATCH 2/2] staging: iio: ad9832: move struct ad9832_platform_data to ad9832.c

Quoted 5 lines · On Mon, 6 Oct 2025 14:40:25 +0500 Taimoor Zaeem <[email protected]> wrote:

The struct ad9832_platform_data is only used in ad9832.c so it moved there instead. With this change, the ad9832.h file becomes empty, so we can remove it.

Hi.

See my reply to earlier thread for why this makes no sense and what needs doing to actually get rid of the platform data in general (and hence the header).

Thanks,

Jonathan

Quoted 84 lines
---
 drivers/staging/iio/frequency/ad9832.c | 21 ++++++++++++++--
 drivers/staging/iio/frequency/ad9832.h | 33 --------------------------
 2 files changed, 19 insertions(+), 35 deletions(-)
 delete mode 100644 drivers/staging/iio/frequency/ad9832.h
drivers/staging/iio/frequency/ad9832.c +19 -2
index 49388da5a684..0517858bc5da 100644
@@ -23,8 +23,6 @@
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
 
-#include "ad9832.h"
-
 #include "dds.h"
 
 /* Registers */
@@ -117,6 +115,25 @@ struct ad9832_state {
 	} __aligned(IIO_DMA_MINALIGN);
 };
 
+/**
+ * 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;
+};
+
 static unsigned long ad9832_calc_freqreg(unsigned long mclk, unsigned long fout)
 {
 	unsigned long long freqreg = (u64)fout *
drivers/staging/iio/frequency/ad9832.h deleted +0 -33
deleted file mode 100644
index d0d840edb8d2..000000000000
@@ -1,33 +0,0 @@
-/* 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_
-
-/*
- * 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_ */