Skip to contentSkip to conversation

drivers: clk: make gpio-gated clock support optional

PATCH In review Enrico Weigelt, metux IT consult 2 participants 2 messages Dec 19, 2019 – Dec 24, 2019

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

PATCH 1/1 drivers: clk: make gpio-gated clock support optional

The gpio-gate-clock / gpio-mux-clock driver isn't used much, just by a few ARM SoCs, so there's no need to always include it unconditionally.

Thus make it optional, but keep it enabled by default.

---
 drivers/clk/Kconfig  | 7 +++++++
 drivers/clk/Makefile | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)
drivers/clk/Kconfig +7 -0
index 45653a0e6ecd..880f89c46f6f 100644
@@ -23,6 +23,13 @@ config COMMON_CLK
 menu "Common Clock Framework"
 	depends on COMMON_CLK
 
+config COMMON_CLK_GPIO
+	tristate "GPIO gated clock support"
+	default y
+	---help---
+	  Supports gpio gated clocks, which can be enabled/disabled via
+	  gpio output.
+
 config COMMON_CLK_WM831X
 	tristate "Clock driver for WM831x/2x PMICs"
 	depends on MFD_WM831X
drivers/clk/Makefile +1 -1
index 0696a0c1ab58..2b614126672a 100644
@@ -11,7 +11,7 @@ obj-$(CONFIG_COMMON_CLK)	+= clk-multiplier.o
 obj-$(CONFIG_COMMON_CLK)	+= clk-mux.o
 obj-$(CONFIG_COMMON_CLK)	+= clk-composite.o
 obj-$(CONFIG_COMMON_CLK)	+= clk-fractional-divider.o
-obj-$(CONFIG_COMMON_CLK)	+= clk-gpio.o
+obj-$(CONFIG_COMMON_CLK_GPIO)	+= clk-gpio.o
 ifeq ($(CONFIG_OF), y)
 obj-$(CONFIG_COMMON_CLK)	+= clk-conf.o
 endif
Signature · 1 line
2.11.0
maintainer
#1 lore raw

Quoting Enrico Weigelt, metux IT consult (2019-12-19 10:19:14)

Quoted 17 lines

The gpio-gate-clock / gpio-mux-clock driver isn't used much, just by a few ARM SoCs, so there's no need to always include it unconditionally.

Thus make it optional, but keep it enabled by default.

---
 drivers/clk/Kconfig  | 7 +++++++
 drivers/clk/Makefile | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)
drivers/clk/Kconfig +0 -0
index 45653a0e6ecd..880f89c46f6f 100644

drivers/clk/Kconfig config COMMON_CLK · line 28

Quoted 6 lines
drivers/clk/Kconfig +3 -0
@@ -23,6 +23,13 @@ config COMMON_CLK
 menu "Common Clock Framework"
        depends on COMMON_CLK
 
+config COMMON_CLK_GPIO
+       tristate "GPIO gated clock support"
+       default y

Maybe make it depend on GPIOLIB and default to that too?

Otherwise sounds OK to me.