Re: [PATCH RFC v5 5/7] ipmi: ls2k: Relax the dependency to its mfd driver

Corey Minyard <[email protected]> Mon, 3 Aug 2026 15:46:36 -0500
Newsgroups dev.linux.lists.mfd,org.kernel.vger.linux-gpio,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Tue, Aug 04, 2026 at 12:55:53AM +0800, Miao Wang via B4 Relay wrote:
> From: Miao Wang <[email protected]>
> 
> There is no strong dependency between the IPMI driver and its mfd
> driver. Although the IPMI driver will not work without the mfd driver,
> it is not a hard dependency. The IPMI driver can actually be compiled
> without the mfd driver, and it will just fail to probe. When the mfd
> driver is loaded, the IPMI driver will probe successfully. Therefore,
> the dependency of the IPMI driver on its mfd driver should be relaxed
> to "imply" from "select". This will allow the mfd driver to be compiled
> as a module and the IPMI driver to be compiled as a part of the ipmi_si
> module. The adjustment to Kconfig for the mfd driver will be introduced
> in the later patch in this series.

I don't think that's what "imply" is for.  Imply seems to be for if
there is another subsystem that can use this subsystem, but doesn't
require it to exist.

For instance:

config SENSORS_NPCM7XX
        tristate "Nuvoton NPCM750 and compatible PWM and Fan controllers"
        imply THERMAL

The fan controller will work fine without the thermal subsystem; you
can control the fan speed without it.  But the thermal subsystem is the
logical user of this.  I looked at many of these things like this.

In the IPMI case, the IPMI driver is useless without the mfd part.  So
there's no point in compiling the IPMI part of this if the mfd part is
not there.

I could be wrong, but I can't see why you would want to do this.

-corey

> 
> Fixes: d46651d4e3c0 ("ipmi: Add Loongson-2K BMC support")
> Signed-off-by: Miao Wang <[email protected]>
> ---
>  drivers/char/ipmi/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/char/ipmi/Kconfig b/drivers/char/ipmi/Kconfig
> index 669f7600019747bcd2b37563477cf336f19a0407..f456e3e89416932f0d21bb742153a503aeb24267 100644
> --- a/drivers/char/ipmi/Kconfig
> +++ b/drivers/char/ipmi/Kconfig
> @@ -87,7 +87,7 @@ config IPMI_IPMB
>  config IPMI_LS2K
>  	bool 'Loongson-2K IPMI interface'
>  	depends on LOONGARCH
> -	select MFD_LS2K_BMC_CORE
> +	imply MFD_LS2K_BMC_CORE
>  	help
>  	  Provides a driver for Loongson-2K IPMI interfaces.
>  
> 
> -- 
> 2.49.0
> 
>