Re: [PATCH] drivers: staging: iio: frequency: ad9832.h: Fixed TODO note.
From: Abdalla Ahmad
Date: Fri Jun 27 2025 - 15:29:52 EST
Hi
> Nothing of the above explains "why you are doing this".
The original TODO in drivers/staging/iio/frequency/ad9832.h was:
> TODO: struct ad9832_platform_data needs to go into include/linux/iio
So I guess if it really needs to go into include/linux/iio and ad9832 being a DAC, then include/linux/iio/dac/ is the appropriate place. Otherwise, the TODO note needs to be removed.
> Also it sounds like you put three different things in one basket.
I don't think it is; the header file is now empty (like some of the header files), subsequently the header moved to a new location and the c source needs to include the new file.
> Haven't you added -M -C when preparing the patch? This will make sure you are really copying / moving the context and show only the differences.
Both gave exact patch file.
> Ideally this should be dropped from any global header file. If one needs something like this, it can be propagated via software nodes.
Well, Including it in include/linux/iio/ made sense to me, would you please elaborate?
Best Regards,
Abdalla
________________________________________
From: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
Sent: Friday, June 27, 2025 9:35 PM
To: Abdalla Ahmad <Abdalla.Ahmad@xxxxxxxxxxxxx>
Cc: Lars-Peter Clausen <lars@xxxxxxxxxx>; Michael Hennerich <Michael.Hennerich@xxxxxxxxxx>; Jonathan Cameron <jic23@xxxxxxxxxx>; David Lechner <dlechner@xxxxxxxxxxxx>; Nuno Sá <nuno.sa@xxxxxxxxxx>; Andy Shevchenko <andy@xxxxxxxxxx>; Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>; Gabriel Shahrouzi <gshahrouzi@xxxxxxxxx>; open list <linux-kernel@xxxxxxxxxxxxxxx>; open list:IIO SUBSYSTEM AND DRIVERS <linux-iio@xxxxxxxxxxxxxxx>; open list:STAGING SUBSYSTEM <linux-staging@xxxxxxxxxxxxxxx>
Subject: Re: [PATCH] drivers: staging: iio: frequency: ad9832.h: Fixed TODO note.
On Fri, Jun 27, 2025 at 08:51:14PM +0300, Abdalla Al-Dalleh wrote:
> - drivers/staging/iio/frequency/ad9832.c: Changed .h file location
> - drivers/staging/iio/frequency/ad9832.h: Removed struct definition
Nothing of the above explains "why you are doing this".
> - include/linux/iio/dac/ad9832.h: Added header file according to the
> TODO note.
Also it sounds like you put three different things in one basket.
...
> #include <linux/iio/iio.h>
> #include <linux/iio/sysfs.h>
> -
This blank line should stay. It will delimit the groups of headers.
> -#include "ad9832.h"
> +#include <linux/iio/dac/ad9832.h>
>
> #include "dds.h"
> +++ b/include/linux/iio/dac/ad9832.h
> @@ -0,0 +1,33 @@
Haven't you added -M -C when preparing the patch? This will make sure you are
really copying / moving the context and show only the differences.
...
> +struct ad9832_platform_data {
> + unsigned long freq0;
> + unsigned long freq1;
> + unsigned short phase0;
> + unsigned short phase1;
> + unsigned short phase2;
> + unsigned short phase3;
> +};
Ideally this should be dropped from any global header file. If one needs
something like this, it can be propagated via software nodes.
--
With Best Regards,
Andy Shevchenko