Skip to contentSkip to conversation

mfd: MAX6650/6651 support

PATCH Applied Laszlo Papp 2 participants 3 messages Feb 12, 2014 Multifunction devices (MFD)

lore
Share & tools
lore
#0 lore raw

PATCH v7 1/1 mfd: MAX6650/6651 support

MAX6650/MAX6651 chip is a multi-function device with I2C busses. The chip includes fan-speed regulators and monitors, GPIO, and alarm.

This patch is an initial release of a MAX6650/6651 MFD driver that supports to enable the chip with its primary I2C bus that will connect the hwmon, and then the gpio devices for now.

---
 drivers/mfd/Kconfig                 | 11 +++++
 drivers/mfd/Makefile                |  1 +
 drivers/mfd/max665x.c               | 93 +++++++++++++++++++++++++++++++++++++
 include/linux/mfd/max665x-private.h | 34 ++++++++++++++
 4 files changed, 139 insertions(+)
 create mode 100644 drivers/mfd/max665x.c
 create mode 100644 include/linux/mfd/max665x-private.h
drivers/mfd/Kconfig +11 -0
index 49bb445..a6c3152 100644
@@ -368,6 +368,17 @@ config MFD_MAX8907
 	  accessing the device; additional drivers must be enabled in order
 	  to use the functionality of the device.
 
+config MFD_MAX665X
+	bool "Maxim Semiconductor MAX6650/MAX6651 Support"
+	depends on I2C
+	select MFD_CORE
+	select REGMAP_I2C
+	help
+	  Say yes here to add support for Maxim Semiconductor MAX6650/MAX6651. This
+	  is a fan speed regulator and monitor IC. This driver provides common
+	  support for accessing the device, additional drivers must be enabled in
+	  order to use the functionality of the device.
+
 config MFD_MAX8925
 	bool "Maxim Semiconductor MAX8925 PMIC Support"
 	depends on I2C=y
drivers/mfd/Makefile +1 -0
index 5aea5ef..63668c5 100644
@@ -111,6 +111,7 @@ obj-$(CONFIG_MFD_DA9055)	+= da9055.o
 da9063-objs			:= da9063-core.o da9063-irq.o da9063-i2c.o
 obj-$(CONFIG_MFD_DA9063)	+= da9063.o
 
+obj-$(CONFIG_MFD_MAX665X)	+= max665x.o
 obj-$(CONFIG_MFD_MAX14577)	+= max14577.o
 obj-$(CONFIG_MFD_MAX77686)	+= max77686.o max77686-irq.o
 obj-$(CONFIG_MFD_MAX77693)	+= max77693.o max77693-irq.o
drivers/mfd/max665x.c new file +93 -0

93 lines not on this page · raw message

include/linux/mfd/max665x-private.h new file +34 -0
new file mode 100644
index 0000000..293db4b
@@ -0,0 +1,34 @@
+/*
+ * max665x-private.h - Driver for the Maxim 6650/6651
+ *
+ * Copyright 2013 Polatis Ltd.
+ *
+ * Author: Laszlo Papp <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef __LINUX_MFD_MAX665X_PRIVATE_H
+#define __LINUX_MFD_MAX665X_PRIVATE_H
+
+#include <linux/i2c.h>
+#include <linux/regmap.h>
+
+struct max665x_dev {
+	struct device *dev;
+	struct mutex iolock;
+	struct i2c_client *i2c;
+	struct regmap     *map;
+	int type;
+};
+
+#endif
Signature · 1 line
1.8.5.4
Applied
#1 lore raw
Quoted 8 lines

MAX6650/MAX6651 chip is a multi-function device with I2C busses. The chip includes fan-speed regulators and monitors, GPIO, and alarm.

This patch is an initial release of a MAX6650/6651 MFD driver that supports to enable the chip with its primary I2C bus that will connect the hwmon, and then the gpio devices for now.

Quoted 8 lines
---
 drivers/mfd/Kconfig                 | 11 +++++
 drivers/mfd/Makefile                |  1 +
 drivers/mfd/max665x.c               | 93 +++++++++++++++++++++++++++++++++++++
 include/linux/mfd/max665x-private.h | 34 ++++++++++++++
 4 files changed, 139 insertions(+)
 create mode 100644 drivers/mfd/max665x.c
 create mode 100644 include/linux/mfd/max665x-private.h

Applied, thanks.

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#2 lore raw
Quoted 17 lines · Lee Jones
Quoted 8 lines

MAX6650/MAX6651 chip is a multi-function device with I2C busses. The chip includes fan-speed regulators and monitors, GPIO, and alarm.

This patch is an initial release of a MAX6650/6651 MFD driver that supports to enable the chip with its primary I2C bus that will connect the hwmon, and then the gpio devices for now.

Quoted 8 lines
---
 drivers/mfd/Kconfig                 | 11 +++++
 drivers/mfd/Makefile                |  1 +
 drivers/mfd/max665x.c               | 93 +++++++++++++++++++++++++++++++++++++
 include/linux/mfd/max665x-private.h | 34 ++++++++++++++
 4 files changed, 139 insertions(+)
 create mode 100644 drivers/mfd/max665x.c
 create mode 100644 include/linux/mfd/max665x-private.h
Quoted 1 line

Applied, thanks.

Thanks (partial celebration time).