Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

irqchip/meson-gpio: Make it possible to build as a module

In order to reduce the kernel Image size on multi-platform distributions,
make it possible to build the Amlogic GPIO IRQ controller as a module
by switching it to a platform driver.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Saravana Kannan <saravanak@google.com>
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210902134914.176986-2-narmstrong@baylibre.com

authored by

Neil Armstrong and committed by
Marc Zyngier
a947aa00 f1985002

+12 -8
+3 -2
drivers/irqchip/Kconfig
··· 400 400 Support for the UniPhier AIDET (ARM Interrupt Detector). 401 401 402 402 config MESON_IRQ_GPIO 403 - bool "Meson GPIO Interrupt Multiplexer" 404 - depends on ARCH_MESON 403 + tristate "Meson GPIO Interrupt Multiplexer" 404 + depends on ARCH_MESON || COMPILE_TEST 405 + default ARCH_MESON 405 406 select IRQ_DOMAIN_HIERARCHY 406 407 help 407 408 Support Meson SoC Family GPIO Interrupt Multiplexer
+9 -6
drivers/irqchip/irq-meson-gpio.c
··· 436 436 .translate = meson_gpio_irq_domain_translate, 437 437 }; 438 438 439 - static int __init meson_gpio_irq_parse_dt(struct device_node *node, 440 - struct meson_gpio_irq_controller *ctl) 439 + static int meson_gpio_irq_parse_dt(struct device_node *node, struct meson_gpio_irq_controller *ctl) 441 440 { 442 441 const struct of_device_id *match; 443 442 int ret; ··· 462 463 return 0; 463 464 } 464 465 465 - static int __init meson_gpio_irq_of_init(struct device_node *node, 466 - struct device_node *parent) 466 + static int meson_gpio_irq_of_init(struct device_node *node, struct device_node *parent) 467 467 { 468 468 struct irq_domain *domain, *parent_domain; 469 469 struct meson_gpio_irq_controller *ctl; ··· 519 521 return ret; 520 522 } 521 523 522 - IRQCHIP_DECLARE(meson_gpio_intc, "amlogic,meson-gpio-intc", 523 - meson_gpio_irq_of_init); 524 + IRQCHIP_PLATFORM_DRIVER_BEGIN(meson_gpio_intc) 525 + IRQCHIP_MATCH("amlogic,meson-gpio-intc", meson_gpio_irq_of_init) 526 + IRQCHIP_PLATFORM_DRIVER_END(meson_gpio_intc) 527 + 528 + MODULE_AUTHOR("Jerome Brunet <jbrunet@baylibre.com>"); 529 + MODULE_LICENSE("GPL v2"); 530 + MODULE_ALIAS("platform:meson-gpio-intc");