mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] hwmon: (lan966x) Select the MMIO regmap backend
@ 2026-11-30 13:20 Pengpeng Hou
  2026-11-30 15:17 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Pengpeng Hou @ 2026-11-30 13:20 UTC (permalink / raw)
  To: linux; +Cc: linux-hwmon, linux-kernel, hppiscas

lan966x-hwmon.c initializes an MMIO regmap using
devm_regmap_init_mmio(), but SENSORS_LAN966X does not select
REGMAP_MMIO. The driver can therefore be enabled without the
required register-transport implementation and fail to build.

Select REGMAP_MMIO so the backend is enabled at the linkage level
required by this consumer, rather than relying on another driver to
pull it in.

The issue was found by our static-analysis tool and manually reviewed.

Fixes: c8f55be4a1c7 ("hwmon: add driver for the Microchip LAN966x SoC")
Signed-off-by: Pengpeng Hou <hppiscas@163.com>
---
AI assistance: gpt 5 (patch preparation and review).

 drivers/hwmon/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 18c682e..8308489 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -1020,7 +1020,7 @@ config SENSORS_PROM21_XHCI
 config SENSORS_LAN966X
 	tristate "Microchip LAN966x Hardware Monitoring"
 	depends on SOC_LAN966 || COMPILE_TEST
-	select REGMAP
+	select REGMAP_MMIO
 	select POLYNOMIAL
 	help
 	  If you say yes here you get support for temperature monitoring

base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] hwmon: (lan966x) Select the MMIO regmap backend
  2026-11-30 13:20 [PATCH] hwmon: (lan966x) Select the MMIO regmap backend Pengpeng Hou
@ 2026-11-30 15:17 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2026-11-30 15:17 UTC (permalink / raw)
  To: Pengpeng Hou; +Cc: linux-hwmon, linux-kernel

On Mon, Nov 30, 2026 at 09:20:53PM +0800, Pengpeng Hou wrote:
> lan966x-hwmon.c initializes an MMIO regmap using
> devm_regmap_init_mmio(), but SENSORS_LAN966X does not select
> REGMAP_MMIO. The driver can therefore be enabled without the
> required register-transport implementation and fail to build.
> 
> Select REGMAP_MMIO so the backend is enabled at the linkage level
> required by this consumer, rather than relying on another driver to
> pull it in.
> 
> The issue was found by our static-analysis tool and manually reviewed.
> 
> Fixes: c8f55be4a1c7 ("hwmon: add driver for the Microchip LAN966x SoC")
> Signed-off-by: Pengpeng Hou <hppiscas@163.com>

Applied.

Thanks,
Guenter

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-30 15:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-30 13:20 [PATCH] hwmon: (lan966x) Select the MMIO regmap backend Pengpeng Hou
2026-11-30 15:17 ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®