Message ID | 20250407145546.270683-13-herve.codina@bootlin.com |
---|---|
State | New |
Headers | show |
Series | lan966x pci device: Add support for SFPs | expand |
Hi Andy, On Mon, 7 Apr 2025 18:38:30 +0300 Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > On Mon, Apr 07, 2025 at 04:55:41PM +0200, Herve Codina wrote: > > The lan966x clock controller depends on the LAN969x architecture or the > > LAN966x SoC. > > > > This clock controller can be used by the LAN966x PCI device and so it > > needs to be available when the LAN966x PCI device is enabled. > > ... > > > depends on HAS_IOMEM > > depends on OF > > - depends on SOC_LAN966 || ARCH_LAN969X || COMPILE_TEST > > + depends on SOC_LAN966 || ARCH_LAN969X || MCHP_LAN966X_PCI || COMPILE_TEST > > This doesn't seem to scale. Why not simply > > depends on HAS_IOMEM > depends on OF || COMPILE_TEST > > ? > With your proposal, if we configure a kernel without SOC_LAN966x or ARCH_LAN969x or MCHP_LAN966X_PCI, in other words we configure a kernel without a real needed for this clock controller driver, the user will be asked about this driver. This was already reported by Geert https://lore.kernel.org/all/369233dfded88ff6fb342e03794fe31985d84d82.1737383314.git.geert+renesas@glider.be/ I agreed with Geert that asking the user about those driver the LAN966x depends on was not a good things and leads to confusion. So, to prevent asking the user about this driver, I followed the same strategy and added the dependencies. IMHO, we should keep those dependencies here. Best regards, Hervé
diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig index 713573b6c86c..de4fe180cd4b 100644 --- a/drivers/clk/Kconfig +++ b/drivers/clk/Kconfig @@ -270,7 +270,7 @@ config COMMON_CLK_LAN966X tristate "Generic Clock Controller driver for LAN966X SoC" depends on HAS_IOMEM depends on OF - depends on SOC_LAN966 || ARCH_LAN969X || COMPILE_TEST + depends on SOC_LAN966 || ARCH_LAN969X || MCHP_LAN966X_PCI || COMPILE_TEST help This driver provides support for Generic Clock Controller(GCK) on LAN966X SoC. GCK generates and supplies clock to various peripherals
The lan966x clock controller depends on the LAN969x architecture or the LAN966x SoC. This clock controller can be used by the LAN966x PCI device and so it needs to be available when the LAN966x PCI device is enabled. Signed-off-by: Herve Codina <herve.codina@bootlin.com> --- drivers/clk/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)