* [PATCH v2 1/2] gpio: omap: allow building the module with COMPILE_TEST=y
@ 2024-12-05 12:06 Bartosz Golaszewski
2024-12-05 12:06 ` [PATCH v2 2/2] gpio: omap: save two lines by using devm_clk_get_prepared() Bartosz Golaszewski
2024-12-12 14:38 ` [PATCH v2 1/2] gpio: omap: allow building the module with COMPILE_TEST=y Bartosz Golaszewski
0 siblings, 2 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2024-12-05 12:06 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Andrew Davis,
Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
Alexander Sverdlin
Cc: linux-gpio, linux-kernel, linux-omap, Bartosz Golaszewski,
Alexander Sverdlin
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
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.
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
Changes in v2:
- rework Kconfig dependencies
drivers/gpio/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 56fee58e281e7..d87b3d99f8f7a 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -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
--
2.45.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2 2/2] gpio: omap: save two lines by using devm_clk_get_prepared()
2024-12-05 12:06 [PATCH v2 1/2] gpio: omap: allow building the module with COMPILE_TEST=y Bartosz Golaszewski
@ 2024-12-05 12:06 ` Bartosz Golaszewski
2024-12-12 14:38 ` [PATCH v2 1/2] gpio: omap: allow building the module with COMPILE_TEST=y Bartosz Golaszewski
1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2024-12-05 12:06 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Andrew Davis,
Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
Alexander Sverdlin
Cc: linux-gpio, linux-kernel, linux-omap, Bartosz Golaszewski,
Alexander Sverdlin
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
We can drop the else branch if we get the clock already prepared using
the relevant helper.
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
drivers/gpio/gpio-omap.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 54c4bfdccf568..57d299d5d0b16 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -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);
}
}
--
2.45.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 1/2] gpio: omap: allow building the module with COMPILE_TEST=y
2024-12-05 12:06 [PATCH v2 1/2] gpio: omap: allow building the module with COMPILE_TEST=y Bartosz Golaszewski
2024-12-05 12:06 ` [PATCH v2 2/2] gpio: omap: save two lines by using devm_clk_get_prepared() Bartosz Golaszewski
@ 2024-12-12 14:38 ` Bartosz Golaszewski
1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2024-12-12 14:38 UTC (permalink / raw)
To: Linus Walleij, Andrew Davis, Grygorii Strashko, Santosh Shilimkar,
Kevin Hilman, Alexander Sverdlin, Bartosz Golaszewski
Cc: Bartosz Golaszewski, linux-gpio, linux-kernel, linux-omap,
Alexander Sverdlin
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
On Thu, 05 Dec 2024 13:06:09 +0100, Bartosz Golaszewski wrote:
> 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,
--
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-12-12 14:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-05 12:06 [PATCH v2 1/2] gpio: omap: allow building the module with COMPILE_TEST=y Bartosz Golaszewski
2024-12-05 12:06 ` [PATCH v2 2/2] gpio: omap: save two lines by using devm_clk_get_prepared() Bartosz Golaszewski
2024-12-12 14:38 ` [PATCH v2 1/2] gpio: omap: allow building the module with COMPILE_TEST=y Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox