Re: [PATCH 04/12] mfd: intel-m10-bmc: Split into core and spi specific parts

From: Guenter Roeck
Date: Tue Nov 08 2022 - 12:05:42 EST


On Tue, Nov 08, 2022 at 04:42:57PM +0200, Ilpo Järvinen wrote:
> Split the common code from intel-m10-bmc driver into intel-m10-bmc-core
> and move the SPI bus parts into an interface specific file.
>
> intel-m10-bmc-core becomes the core MFD functions which can support
> multiple bus interface like SPI bus.
>
> Co-developed-by: Tianfei zhang <tianfei.zhang@xxxxxxxxx>
> Signed-off-by: Tianfei zhang <tianfei.zhang@xxxxxxxxx>
> Reviewed-by: Russ Weight <russell.h.weight@xxxxxxxxx>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
> ---
> MAINTAINERS | 2 +-
> drivers/fpga/Kconfig | 2 +-
> drivers/hwmon/Kconfig | 2 +-
> drivers/mfd/Kconfig | 30 ++--
> drivers/mfd/Makefile | 5 +-
> drivers/mfd/intel-m10-bmc-core.c | 122 +++++++++++++++++
> .../{intel-m10-bmc.c => intel-m10-bmc-spi.c} | 128 +++---------------
> include/linux/mfd/intel-m10-bmc.h | 6 +
> 8 files changed, 173 insertions(+), 124 deletions(-)
> create mode 100644 drivers/mfd/intel-m10-bmc-core.c
> rename drivers/mfd/{intel-m10-bmc.c => intel-m10-bmc-spi.c} (60%)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index cf0f18502372..ddfa4f8b3c80 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -10452,7 +10452,7 @@ S: Maintained
> F: Documentation/ABI/testing/sysfs-driver-intel-m10-bmc
> F: Documentation/hwmon/intel-m10-bmc-hwmon.rst
> F: drivers/hwmon/intel-m10-bmc-hwmon.c
> -F: drivers/mfd/intel-m10-bmc.c
> +F: drivers/mfd/intel-m10-bmc*
> F: include/linux/mfd/intel-m10-bmc.h
>
> INTEL MENLOW THERMAL DRIVER
> diff --git a/drivers/fpga/Kconfig b/drivers/fpga/Kconfig
> index d1a8107fdcb3..e4daf79943ee 100644
> --- a/drivers/fpga/Kconfig
> +++ b/drivers/fpga/Kconfig
> @@ -246,7 +246,7 @@ config FPGA_MGR_VERSAL_FPGA
>
> config FPGA_M10_BMC_SEC_UPDATE
> tristate "Intel MAX10 BMC Secure Update driver"
> - depends on MFD_INTEL_M10_BMC && FW_UPLOAD
> + depends on MFD_INTEL_M10_BMC_CORE && FW_UPLOAD
> help
> Secure update support for the Intel MAX10 board management
> controller.
> diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
> index 7ac3daaf59ce..984a55e0f313 100644
> --- a/drivers/hwmon/Kconfig
> +++ b/drivers/hwmon/Kconfig
> @@ -2321,7 +2321,7 @@ config SENSORS_XGENE
>
> config SENSORS_INTEL_M10_BMC_HWMON
> tristate "Intel MAX10 BMC Hardware Monitoring"
> - depends on MFD_INTEL_M10_BMC
> + depends on MFD_INTEL_M10_BMC_CORE

In my opinion the change from MFD_INTEL_M10_BMC to MFD_INTEL_M10_BMC_CORE
(and thus the need to touch lots of Kconfig files) is not really necessary.

Not worth bike shedding about, though, so for hwmon

Acked-by: Guenter Roeck <linux@xxxxxxxxxxxx>

Guenter