Skip to contentSkip to conversation

hwmon: add initial NXP MC34VR500 PMIC monitoring support

PATCH Superseded Mario Kicherer 1 participant 1 message Jan 17, 2023 Hardware monitoring

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 hwmon: add initial NXP MC34VR500 PMIC monitoring support

This patch adds initial monitoring support for the MC34VR500 PMIC. In its current form, input voltage and temperature alarms are reported to hwmon.

Datasheet:
- https://www.nxp.com/docs/en/data-sheet/MC34VR500.pdf

Changes since v1:
- included required #defines directly in the C file
- removed separate header file
- removed #defines for unimplemented sensors
- removed error log output
- use hwmon_device_register_with_info API
- cleaned probe function
- added documentation for chip and dt bindings

---
 drivers/hwmon/Kconfig     |   7 ++
 drivers/hwmon/Makefile    |   1 +
 drivers/hwmon/mc34vr500.c | 245 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 253 insertions(+)
 create mode 100644 drivers/hwmon/mc34vr500.c
drivers/hwmon/Kconfig +7 -0
index 3176c33af6c6..69d4c1609494 100644
@@ -1166,6 +1166,13 @@ config SENSORS_MAX31790
 	  This driver can also be built as a module. If so, the module
 	  will be called max31790.
 
+config SENSORS_MC34VR500
+	tristate "NXP MC34VR500 hardware monitoring driver"
+	depends on I2C
+	help
+	  If you say yes here you get support for the temperature and input
+	  voltage sensors of the NXP MC34VR500.
+
 config SENSORS_MCP3021
 	tristate "Microchip MCP3021 and compatibles"
 	depends on I2C
drivers/hwmon/Makefile +1 -0
index e2e4e87b282f..4bef13d16c66 100644
@@ -149,6 +149,7 @@ obj-$(CONFIG_SENSORS_MAX6650)	+= max6650.o
 obj-$(CONFIG_SENSORS_MAX6697)	+= max6697.o
 obj-$(CONFIG_SENSORS_MAX31790)	+= max31790.o
 obj-$(CONFIG_SENSORS_MC13783_ADC)+= mc13783-adc.o
+obj-$(CONFIG_SENSORS_MC34VR500)	+= mc34vr500.o
 obj-$(CONFIG_SENSORS_MCP3021)	+= mcp3021.o
 obj-$(CONFIG_SENSORS_TC654)	+= tc654.o
 obj-$(CONFIG_SENSORS_TPS23861)	+= tps23861.o
drivers/hwmon/mc34vr500.c new file +245 -0

245 lines not on this page · raw message

Signature · 1 line
2.34.1