Re: [PATCH RFC v6 5/7] ipmi: ls2k: adjust dependency to its mfd driver

Corey Minyard <[email protected]>
Newsgroups org.kernel.vger.linux-kernel,dev.linux.lists.mfd,org.kernel.vger.linux-gpio
Message-ID <[email protected]>
On Wed, Aug 05, 2026 at 03:14:23AM +0800, Miao Wang via B4 Relay wrote:
> From: Miao Wang <[email protected]>
> 
> There is functional dependency between the IPMI driver and its mfd
> driver. Previously, the dependency was set to "select" from
> IPMI_LS2K to MFD_LS2K_BMC_CORE. However, the ipmi driver is actually
> compiled as a part of the ipmi_si module, and IPMI_LS2K is a bool
> option. Therefore, the dependency "select" will force the mfd driver
> to be compiled built-in when the ipmi driver is built as a module. This
> is not desirable. This patch fixes this by declaring a conditional
> dependency from IPMI_SI to MFD_LS2K_BMC_CORE if IPMI_LS2K is selected.
> This will allow the mfd driver to be compiled as a module if the ipmi
> driver is built as a module. The adjustment to Kconfig for the mfd
> driver will be introduced in the later patch in this series.

Looks good to me.

Acked-by: Corey Minyard <[email protected]>

> 
> 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..07f3308c71616215871a730b87f1991d2b502e63 100644
> --- a/drivers/char/ipmi/Kconfig
> +++ b/drivers/char/ipmi/Kconfig
> @@ -62,6 +62,7 @@ config IPMI_DEVICE_INTERFACE
>  config IPMI_SI
>  	tristate 'IPMI System Interface handler'
>  	select IPMI_PLAT_DATA
> +	select MFD_LS2K_BMC_CORE if IPMI_LS2K
>  	help
>  	  Provides a driver for System Interfaces (KCS, SMIC, BT).
>  	  Currently, only KCS and SMIC are supported.  If
> @@ -87,7 +88,6 @@ config IPMI_IPMB
>  config IPMI_LS2K
>  	bool 'Loongson-2K IPMI interface'
>  	depends on LOONGARCH
> -	select MFD_LS2K_BMC_CORE
>  	help
>  	  Provides a driver for Loongson-2K IPMI interfaces.
>  
> 
> -- 
> 2.49.0
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.