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

From: Jonathan Cameron
Date: Sat Jun 28 2025 - 11:11:00 EST


On Sat, 28 Jun 2025 07:08:46 +0100
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:

> 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
> > - include/linux/iio/dac/ad9832.h: Added header file according to the
> > TODO note.
> >
> > Signed-off-by: Abdalla Al-Dalleh <abdalla.ahmad@xxxxxxxxxxxxx>
> > ---
> > drivers/staging/iio/frequency/ad9832.c | 3 +--
> > drivers/staging/iio/frequency/ad9832.h | 23 ------------------
> > include/linux/iio/dac/ad9832.h | 33 ++++++++++++++++++++++++++
>
> Staging drivers need to be "self-contained" for now.
>
> Why do you even need a .h file for a single .c file anyway? Why not
> just remove it?
>

Better yet would be to switch away from platform data as that belongs
to a long gone era.

However in this case it's all a bit pointless as we don't normally support 'power
up settings' of things like this. Power up state until someone opts in
should be to output nothing at all. That should be same as before the driver
loads if the device doesn't have non volatile storage to save a requested
setup from a previous boot.

The policy decision on what to output is a user space script problem, not
something that we should provide from firmware.

Jonathan


> thanks,
>
> greg k-h