Skip to contentSkip to conversation

mfd: max597x: Add support for max597x

PATCH New Naresh Solanki 1 participant 2 messages Jul 4, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover mfd: max597x: Add support for max597x

max597x is multifunction device with hot swap controller, fault protection & upto four indication leds.

max5978 has single hot swap controller whereas max5970 has two hot swap controllers.

Marcello Sylvester Bauer (1):
dt-bindings: mfd: Add bindings for MAX5970 and MAX5978

Patrick Rudolph (4):
mfd: max597x: Add support for MAX5970 and MAX5978
regulator: max597x: Add support for max597x regulator
iio: max597x: Add support for max597x
leds: max597x: Add support for max597x

 .../devicetree/bindings/mfd/max5970.yaml      | 164 ++++++
 drivers/iio/adc/Kconfig                       |   9 +
 drivers/iio/adc/Makefile                      |   1 +
 drivers/iio/adc/max597x-iio.c                 | 156 ++++++
 drivers/leds/Kconfig                          |  10 +
 drivers/leds/Makefile                         |   1 +
 drivers/leds/leds-max597x.c                   | 130 +++++
 drivers/mfd/Kconfig                           |  12 +
 drivers/mfd/Makefile                          |   2 +
 drivers/mfd/max597x.c                         | 109 ++++
 drivers/regulator/Kconfig                     |  10 +
 drivers/regulator/Makefile                    |   1 +
 drivers/regulator/max597x-regulator.c         | 506 ++++++++++++++++++
 include/linux/mfd/max597x.h                   | 100 ++++
 14 files changed, 1211 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/max5970.yaml
 create mode 100644 drivers/iio/adc/max597x-iio.c
 create mode 100644 drivers/leds/leds-max597x.c
 create mode 100644 drivers/mfd/max597x.c
 create mode 100644 drivers/regulator/max597x-regulator.c
 create mode 100644 include/linux/mfd/max597x.h

base-commit: 88084a3df1672e131ddc1b4e39eeacfd39864acf

Signature · 1 line
2.35.3
#1 lore raw

PATCH 4/5 iio: max597x: Add support for max597x

From: Patrick Rudolph <[email protected]>

max597x has 10bit ADC for voltage & current monitoring. Use iio framework to expose the same in sysfs.

---
 drivers/iio/adc/Kconfig       |   9 ++
 drivers/iio/adc/Makefile      |   1 +
 drivers/iio/adc/max597x-iio.c | 156 ++++++++++++++++++++++++++++++++++
 3 files changed, 166 insertions(+)
 create mode 100644 drivers/iio/adc/max597x-iio.c
drivers/iio/adc/Kconfig +9 -0
index 48ace7412874..d4676eefb60f 100644
@@ -683,6 +683,15 @@ config MAX1363
 	  To compile this driver as a module, choose M here: the module will be
 	  called max1363.
 
+config MAX597X_IIO
+	tristate "Maxim 597x power switch and monitor"
+	depends on I2C
+	depends on OF
+	select MFD_MAX597X
+	help
+	  This driver exposes Maxim 5970/5978 voltage/current monitoring
+	  interface using iio framework.
+
 config MAX9611
 	tristate "Maxim max9611/max9612 ADC driver"
 	depends on I2C
drivers/iio/adc/Makefile +1 -0
index 39d806f6d457..f8cb5a30a946 100644
@@ -63,6 +63,7 @@ obj-$(CONFIG_MAX11100) += max11100.o
 obj-$(CONFIG_MAX1118) += max1118.o
 obj-$(CONFIG_MAX1241) += max1241.o
 obj-$(CONFIG_MAX1363) += max1363.o
+obj-$(CONFIG_MAX597X_IIO) += max597x-iio.o
 obj-$(CONFIG_MAX9611) += max9611.o
 obj-$(CONFIG_MCP320X) += mcp320x.o
 obj-$(CONFIG_MCP3422) += mcp3422.o
drivers/iio/adc/max597x-iio.c new file +156 -0

156 lines not on this page · raw message

Signature · 1 line
2.35.3