Remove ad9832.h and ad9834.h header files in drivers/staging/iio/frequency
Subsystems (4)
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
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
@@ -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
@@ -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
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.hheader 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
Signed-off-by Taimoor Zaeem <[email protected]>--- 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.hdrivers/staging/iio/frequency/ad9834.c +1
-2@@ -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@@ -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_ */
PATCH 2/2 staging: iio: ad9832: move struct ad9832_platform_data to ad9832.c
In reply to Taimoor ZaeemThe 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
@@ -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
@@ -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
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_datais only used inad9832.cso it moved there instead. With this change, thead9832.hfile becomes empty, so we can remove it.Signed-off-by Taimoor Zaeem <[email protected]>
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.hdrivers/staging/iio/frequency/ad9832.c +19
-2@@ -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@@ -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_ */