can: ctucanfd: Let users select instead of depend on CAN_CTUCANFD
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 9 May 2022 14:02:59 +0000 (16:02 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 16 May 2022 20:03:45 +0000 (22:03 +0200)
The CTU CAN-FD IP core is only useful when used with one of the
corresponding PCI/PCIe or platform (FPGA, SoC) drivers, which depend on
PCI resp. OF.

Hence make the users select the core driver code, instead of letting
then depend on it.  Keep the core code config option visible when
compile-testing, to maintain compile-coverage.

Link: https://lore.kernel.org/all/887b7440446b6244a20a503cc6e8dc9258846706.1652104941.git.geert+renesas@glider.be
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/ctucanfd/Kconfig

index 48963ef..3c38361 100644 (file)
@@ -1,5 +1,5 @@
 config CAN_CTUCANFD
-       tristate "CTU CAN-FD IP core"
+       tristate "CTU CAN-FD IP core" if COMPILE_TEST
        help
          This driver adds support for the CTU CAN FD open-source IP core.
          More documentation and core sources at project page
@@ -13,8 +13,8 @@ config CAN_CTUCANFD
 
 config CAN_CTUCANFD_PCI
        tristate "CTU CAN-FD IP core PCI/PCIe driver"
-       depends on CAN_CTUCANFD
        depends on PCI
+       select CAN_CTUCANFD
        help
          This driver adds PCI/PCIe support for CTU CAN-FD IP core.
          The project providing FPGA design for Intel EP4CGX15 based DB4CGX15
@@ -23,8 +23,8 @@ config CAN_CTUCANFD_PCI
 
 config CAN_CTUCANFD_PLATFORM
        tristate "CTU CAN-FD IP core platform (FPGA, SoC) driver"
-       depends on CAN_CTUCANFD
        depends on OF || COMPILE_TEST
+       select CAN_CTUCANFD
        help
          The core has been tested together with OpenCores SJA1000
          modified to be CAN FD frames tolerant on MicroZed Zynq based