Skip to contentSkip to conversation

hwmon: (lan966x) Select the MMIO regmap backend

PATCH Applied Pengpeng Hou 3 participants 3 messages Nov 30 Hardware monitoring

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwmon: (lan966x) Select the MMIO regmap backend

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")

---
AI assistance: gpt 5 (patch preparation and review).

 drivers/hwmon/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/Kconfig +1 -1
index 18c682e..8308489 100644
@@ -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

#1 lore raw
Sashiko has reviewed this patch and found no issues.
Quoted 5 lines

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.

Quoted 8 lines

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")

Sashiko has reviewed this patch and found no issues.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
maintainer Applied
#2 lore raw
In reply to Pengpeng Hou
Quoted 5 lines · Pengpeng Hou

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.

Quoted 8 lines

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")

Applied.

Thanks,
Guenter