gpio: sifive: Allow building the driver as a module

This can reduce the kernel image size in multiplatform configurations.

Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
This commit is contained in:
Samuel Holland 2023-07-24 17:40:42 -07:00 committed by Bartosz Golaszewski
parent 3b5560c8f0
commit 6b4c76ded3
2 changed files with 6 additions and 2 deletions

View File

@ -564,7 +564,7 @@ config GPIO_SAMA5D2_PIOBU
maintain their value during backup/self-refresh.
config GPIO_SIFIVE
bool "SiFive GPIO support"
tristate "SiFive GPIO support"
depends on OF_GPIO
select IRQ_DOMAIN_HIERARCHY
select GPIO_GENERIC

View File

@ -267,4 +267,8 @@ static struct platform_driver sifive_gpio_driver = {
.of_match_table = sifive_gpio_match,
},
};
builtin_platform_driver(sifive_gpio_driver)
module_platform_driver(sifive_gpio_driver)
MODULE_AUTHOR("Yash Shah <yash.shah@sifive.com>");
MODULE_DESCRIPTION("SiFive GPIO driver");
MODULE_LICENSE("GPL");