Skip to contentSkip to conversation

gpio: omap: allow building the module with COMPILE_TEST=y

PATCH Applied Bartosz Golaszewski 1 participant 3 messages Dec 5, 2024 – Dec 12, 2024

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

PATCH v2 1/2 gpio: omap: allow building the module with COMPILE_TEST=y

From: Bartosz Golaszewski <[email protected]>

For better build coverage, allow building the gpio-omap driver with COMPILE_TEST Kconfig option enabled.

While at it: simplify the dependencies and drop the dependency on ARM as it's already implied by ARCH_OMAP.

---
Changes in v2:
- rework Kconfig dependencies

 drivers/gpio/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpio/Kconfig +2 -2
index 56fee58e281e7..d87b3d99f8f7a 100644
@@ -528,9 +528,9 @@ config GPIO_OCTEON
 	  family of SOCs.
 
 config GPIO_OMAP
-	tristate "TI OMAP GPIO support" if ARCH_OMAP2PLUS || COMPILE_TEST
+	tristate "TI OMAP GPIO support"
+	depends on ARCH_OMAP || COMPILE_TEST
 	default y if ARCH_OMAP
-	depends on ARM
 	select GENERIC_IRQ_CHIP
 	select GPIOLIB_IRQCHIP
 	help
Signature · 1 line
2.45.2
#1 lore raw

PATCH v2 2/2 gpio: omap: save two lines by using devm_clk_get_prepared()

From: Bartosz Golaszewski <[email protected]>

We can drop the else branch if we get the clock already prepared using the relevant helper.

---
 drivers/gpio/gpio-omap.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpio/gpio-omap.c +1 -3
index 54c4bfdccf568..57d299d5d0b16 100644
@@ -1449,13 +1449,11 @@ static int omap_gpio_probe(struct platform_device *pdev)
 	}
 
 	if (bank->dbck_flag) {
-		bank->dbck = devm_clk_get(dev, "dbclk");
+		bank->dbck = devm_clk_get_prepared(dev, "dbclk");
 		if (IS_ERR(bank->dbck)) {
 			dev_err(dev,
 				"Could not get gpio dbck. Disable debounce\n");
 			bank->dbck_flag = false;
-		} else {
-			clk_prepare(bank->dbck);
 		}
 	}
 
Signature · 1 line
2.45.2
author Applied
#2 lore raw
In reply to Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

Quoted 8 lines · Bartosz Golaszewski

For better build coverage, allow building the gpio-omap driver with COMPILE_TEST Kconfig option enabled.

While at it: simplify the dependencies and drop the dependency on ARM as it's already implied by ARCH_OMAP.

[...]

Applied, thanks!

[1/2] gpio: omap: allow building the module with COMPILE_TEST=y

      commit: 934bacb6441afdb77093a46b3138f81cbcde7d81
[2/2] gpio: omap: save two lines by using devm_clk_get_prepared()
      commit: b7bbaff8c1bccf48958e52f6f03593fc47906b5d

Best regards,

Signature · 1 line
Bartosz Golaszewski <[email protected]>