linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: iio: ad9832: move ad9832_platform_data into include/linux/lib
@ 2025-10-05 12:18 Taimoor Zaeem
  2025-10-05 14:00 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Taimoor Zaeem @ 2025-10-05 12:18 UTC (permalink / raw)
  To: jic23, gregkh; +Cc: linux-iio, linux-staging, Taimoor Zaeem

Move struct ad9832_platform_data from
drivers/staging/iio/frequency/ad9832.h to
include/linux/iio/frequency/ad9832.h.

This clears a TODO item in the drivers.

Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com>
---
 drivers/staging/iio/frequency/ad9832.c                    | 3 +--
 {drivers/staging => include/linux}/iio/frequency/ad9832.h | 4 ----
 2 files changed, 1 insertion(+), 6 deletions(-)
 rename {drivers/staging => include/linux}/iio/frequency/ad9832.h (91%)

diff --git a/drivers/staging/iio/frequency/ad9832.c b/drivers/staging/iio/frequency/ad9832.c
index 49388da5a684..76bc384dfad1 100644
--- a/drivers/staging/iio/frequency/ad9832.c
+++ b/drivers/staging/iio/frequency/ad9832.c
@@ -22,8 +22,7 @@
 
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
-
-#include "ad9832.h"
+#include <linux/iio/frequency/ad9832.h>
 
 #include "dds.h"
 
diff --git a/drivers/staging/iio/frequency/ad9832.h b/include/linux/iio/frequency/ad9832.h
similarity index 91%
rename from drivers/staging/iio/frequency/ad9832.h
rename to include/linux/iio/frequency/ad9832.h
index d0d840edb8d2..81c97a521812 100644
--- a/drivers/staging/iio/frequency/ad9832.h
+++ b/include/linux/iio/frequency/ad9832.h
@@ -7,10 +7,6 @@
 #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
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: iio: ad9832: move ad9832_platform_data into include/linux/lib
  2025-10-05 12:18 [PATCH] staging: iio: ad9832: move ad9832_platform_data into include/linux/lib Taimoor Zaeem
@ 2025-10-05 14:00 ` Greg KH
  2025-10-05 14:47   ` Taimoor Zaeem
  2025-10-06 10:57   ` Jonathan Cameron
  0 siblings, 2 replies; 5+ messages in thread
From: Greg KH @ 2025-10-05 14:00 UTC (permalink / raw)
  To: Taimoor Zaeem; +Cc: jic23, linux-iio, linux-staging

On Sun, Oct 05, 2025 at 05:18:29PM +0500, Taimoor Zaeem wrote:
> Move struct ad9832_platform_data from
> drivers/staging/iio/frequency/ad9832.h to
> include/linux/iio/frequency/ad9832.h.
> 
> This clears a TODO item in the drivers.

No, this should only happen when the whole driver moves out of
drivers/staging/, staging drivers shoul dbe self-contained.

Also, why is a .h file needed for just one file anyway?  Shouldn't this
be part of the .c file instead?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: iio: ad9832: move ad9832_platform_data into include/linux/lib
  2025-10-05 14:00 ` Greg KH
@ 2025-10-05 14:47   ` Taimoor Zaeem
  2025-10-06  6:21     ` Greg KH
  2025-10-06 10:57   ` Jonathan Cameron
  1 sibling, 1 reply; 5+ messages in thread
From: Taimoor Zaeem @ 2025-10-05 14:47 UTC (permalink / raw)
  To: gregkh; +Cc: jic23, linux-iio, linux-staging, taimoorzaeem

> No, this should only happen when the whole driver moves out of
> drivers/staging/, staging drivers shoul dbe self-contained.

Right, I see.

> Also, why is a .h file needed for just one file anyway?  Shouldn't this
> be part of the .c file instead?

Not sure what's the convention here, but yes it could be part of .c instead. There is another .h file in the same directory (ad9834.h) which is basically empty. Should we remove that too?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: iio: ad9832: move ad9832_platform_data into include/linux/lib
  2025-10-05 14:47   ` Taimoor Zaeem
@ 2025-10-06  6:21     ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2025-10-06  6:21 UTC (permalink / raw)
  To: Taimoor Zaeem; +Cc: jic23, linux-iio, linux-staging

On Sun, Oct 05, 2025 at 07:47:58PM +0500, Taimoor Zaeem wrote:
> > Also, why is a .h file needed for just one file anyway?  Shouldn't this
> > be part of the .c file instead?
> 
> Not sure what's the convention here, but yes it could be part of .c instead. There is another .h file in the same directory (ad9834.h) which is basically empty. Should we remove that too?

Yes please.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: iio: ad9832: move ad9832_platform_data into include/linux/lib
  2025-10-05 14:00 ` Greg KH
  2025-10-05 14:47   ` Taimoor Zaeem
@ 2025-10-06 10:57   ` Jonathan Cameron
  1 sibling, 0 replies; 5+ messages in thread
From: Jonathan Cameron @ 2025-10-06 10:57 UTC (permalink / raw)
  To: Greg KH; +Cc: Taimoor Zaeem, jic23, linux-iio, linux-staging, Nuno Sá

On Sun, 5 Oct 2025 16:00:33 +0200
Greg KH <gregkh@linuxfoundation.org> wrote:

> On Sun, Oct 05, 2025 at 05:18:29PM +0500, Taimoor Zaeem wrote:
> > Move struct ad9832_platform_data from
> > drivers/staging/iio/frequency/ad9832.h to
> > include/linux/iio/frequency/ad9832.h.
> > 
> > This clears a TODO item in the drivers.  
> 
> No, this should only happen when the whole driver moves out of
> drivers/staging/, staging drivers shoul dbe self-contained.
> 
> Also, why is a .h file needed for just one file anyway?  Shouldn't this
> be part of the .c file instead?

It's an old school board file / platform data definition.

So it would be fine to get rid of that entirely and move the
driver to appropriate modern firmware interfaces but if we keep the
struct definition it doesn't make sense to move it into the C file.

I'm edging closer to just posting a series to get rid of these
remaining IIO drivers in staging, but normally I've only done that
when the parts have gone out of production as until that point it
seems reasonable that they might eventually get cleaned up, ABI
fixed etc and the costs of keeping them around are low.

Nuno, can you see if you can get a view from ADI on whether there
will ever be any effort to sort these ancient drivers out?
I appreciate that may be challenging to answer though.

Jonathan

> 
> thanks,
> 
> greg k-h
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-10-06 10:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-05 12:18 [PATCH] staging: iio: ad9832: move ad9832_platform_data into include/linux/lib Taimoor Zaeem
2025-10-05 14:00 ` Greg KH
2025-10-05 14:47   ` Taimoor Zaeem
2025-10-06  6:21     ` Greg KH
2025-10-06 10:57   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).