From: Jonathan Cameron <jonathan.cameron@huawei.com>
To: Taimoor Zaeem <taimoorzaeem@gmail.com>
Cc: <jic23@kernel.org>, <gregkh@linuxfoundation.org>,
<linux-iio@vger.kernel.org>, <linux-staging@lists.linux.dev>
Subject: Re: [PATCH 2/2] staging: iio: ad9832: move struct ad9832_platform_data to ad9832.c
Date: Tue, 7 Oct 2025 13:48:50 +0100 [thread overview]
Message-ID: <20251007134850.00005f9f@huawei.com> (raw)
In-Reply-To: <20251006094025.259440-3-taimoorzaeem@gmail.com>
On Mon, 6 Oct 2025 14:40:25 +0500
Taimoor Zaeem <taimoorzaeem@gmail.com> 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.
>
> Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com>
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
> ---
> 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
>
> diff --git a/drivers/staging/iio/frequency/ad9832.c b/drivers/staging/iio/frequency/ad9832.c
> index 49388da5a684..0517858bc5da 100644
> --- a/drivers/staging/iio/frequency/ad9832.c
> +++ b/drivers/staging/iio/frequency/ad9832.c
> @@ -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 *
> diff --git a/drivers/staging/iio/frequency/ad9832.h b/drivers/staging/iio/frequency/ad9832.h
> deleted file mode 100644
> index d0d840edb8d2..000000000000
> --- a/drivers/staging/iio/frequency/ad9832.h
> +++ /dev/null
> @@ -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_ */
prev parent reply other threads:[~2025-10-07 12:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-06 9:40 [PATCH 0/2] Remove ad9832.h and ad9834.h header files in drivers/staging/iio/frequency Taimoor Zaeem
2025-10-06 9:40 ` [PATCH 1/2] staging: iio: ad9834: remove empty ad9834.h file Taimoor Zaeem
2025-10-12 14:17 ` Jonathan Cameron
2025-10-06 9:40 ` [PATCH 2/2] staging: iio: ad9832: move struct ad9832_platform_data to ad9832.c Taimoor Zaeem
2025-10-07 12:48 ` Jonathan Cameron [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251007134850.00005f9f@huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=taimoorzaeem@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox