Skip to contentSkip to conversation

menuconfigification work

RFC PATCH New Vincent Legoll 1 participant 2 messages Apr 9, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 menuconfigification work

Hello,

This is a RFC, for making some menus in Kconfig into menuconfigs, so that it is easier to disable a whole tree of options without even entering the menu.

The rationale is that the people that build their own kernels may want to disable unused things.

I tried with one of the easy ones (or so I think) PPS.

Did I do it properly ?

I had to change some "if PPS" into "depends", and even add one that was implicit before, to PPS_GENERATOR_PARPORT.

Is this kind of work wanted ?
Is this acceptable for mainline ?

If yes, I intend to find other candidates and do proper patch submissions, with the relevant maintainers also included in the review.

Please advise
Thanks

#1 lore raw

PATCH 1/1 Make PPS a menuconfig to ease disabling it all

No need to get into the submenu to disable all PPS-related config entries

The BROKEN PPS_GENERATOR_PARPORT now also depends on PPS

---
 drivers/pps/Kconfig            | 12 +++---------
 drivers/pps/clients/Kconfig    |  6 ++----
 drivers/pps/generators/Kconfig |  3 ++-
 3 files changed, 7 insertions(+), 14 deletions(-)
drivers/pps/Kconfig +3 -9
index 564a51a..4b29a71 100644
@@ -2,9 +2,7 @@
 # PPS support configuration
 #
 
-menu "PPS support"
-
-config PPS
+menuconfig PPS
 	tristate "PPS support"
 	---help---
 	  PPS (Pulse Per Second) is a special pulse provided by some GPS
@@ -20,10 +18,10 @@ config PPS
 
 	  To compile this driver as a module, choose M here: the module
 	  will be called pps_core.ko.
-if PPS
 
 config PPS_DEBUG
 	bool "PPS debugging messages"
+	depends on PPS
 	help
 	  Say Y here if you want the PPS support to produce a bunch of debug
 	  messages to the system log.  Select this if you are having a
@@ -31,17 +29,13 @@ config PPS_DEBUG
 
 config NTP_PPS
 	bool "PPS kernel consumer support"
-	depends on !NO_HZ_COMMON
+	depends on PPS && !NO_HZ_COMMON
 	help
 	  This option adds support for direct in-kernel time
 	  synchronization using an external PPS signal.
 
 	  It doesn't work on tickless systems at the moment.
 
-endif
-
 source drivers/pps/clients/Kconfig
 
 source drivers/pps/generators/Kconfig
-
-endmenu
drivers/pps/clients/Kconfig +2 -4
index 0c9f280..efec021 100644
@@ -2,12 +2,12 @@
 # PPS clients configuration
 #
 
-if PPS
-
 comment "PPS clients support"
+	depends on PPS
 
 config PPS_CLIENT_KTIMER
 	tristate "Kernel timer client (Testing client, use for debug)"
+	depends on PPS
 	help
 	  If you say yes here you get support for a PPS debugging client
 	  which uses a kernel timer to generate the PPS signal.
@@ -37,5 +37,3 @@ config PPS_CLIENT_GPIO
 	  GPIO. To be useful you must also register a platform device
 	  specifying the GPIO pin and other options, usually in your board
 	  setup.
-
-endif
drivers/pps/generators/Kconfig +2 -1
index e4c4f3d..86b5937 100644
@@ -3,10 +3,11 @@
 #
 
 comment "PPS generators support"
+	depends on PPS
 
 config PPS_GENERATOR_PARPORT
 	tristate "Parallel port PPS signal generator"
-	depends on PARPORT && BROKEN
+	depends on PPS && PARPORT && BROKEN
 	help
 	  If you say yes here you get support for a PPS signal generator which
 	  utilizes STROBE pin of a parallel port to send PPS signals. It uses
Signature · 1 line
2.9.3