Re: [PATCH] drivers: staging: iio: frequency: ad9832.h: Fixed TODO note.

From: Andy Shevchenko
Date: Fri Jun 27 2025 - 14:35:29 EST


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