Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752677AbaBJLW4 (ORCPT ); Mon, 10 Feb 2014 06:22:56 -0500 Received: from mail-wi0-f171.google.com ([209.85.212.171]:42818 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752378AbaBJLWs (ORCPT ); Mon, 10 Feb 2014 06:22:48 -0500 Date: Mon, 10 Feb 2014 11:22:42 +0000 From: Lee Jones To: Laszlo Papp Cc: linus.walleij@linaro.org, k.kozlowski@samsung.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] mfd: MAX6650/6651 support Message-ID: <20140210112242.GB21522@lee--X1> References: <1392019497-12440-1-git-send-email-lpapp@kde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1392019497-12440-1-git-send-email-lpapp@kde.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 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. > > Signed-off-by: Laszlo Papp > --- > drivers/mfd/Kconfig | 11 +++++ > drivers/mfd/Makefile | 1 + > drivers/mfd/max665x.c | 88 +++++++++++++++++++++++++++++++++++++ > include/linux/mfd/max665x-private.h | 42 ++++++++++++++++++ > 4 files changed, 142 insertions(+) > create mode 100644 drivers/mfd/max665x.c > create mode 100644 include/linux/mfd/max665x-private.h > > diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig > index 49bb445..4ad39f4 100644 > --- a/drivers/mfd/Kconfig > +++ b/drivers/mfd/Kconfig > @@ -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" > + select MFD_CORE > + depends on I2C > + select REGMAP_I2C > + help > + Say yes here to 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 > diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile > index 5aea5ef..63668c5 100644 > --- a/drivers/mfd/Makefile > +++ b/drivers/mfd/Makefile > @@ -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 > diff --git a/drivers/mfd/max665x.c b/drivers/mfd/max665x.c > new file mode 100644 > index 0000000..cd39b5a > --- /dev/null > +++ b/drivers/mfd/max665x.c > @@ -0,0 +1,88 @@ > +/* > + * Device access for MAX6650-MAX6651 > + * > + * Copyright(c) 2013 Polatis Ltd. > + * > + * Author: Laszlo Papp > + * > + * 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. > + */ > + > +#include > +#include > +#include > +#include > + > +#include > + > +static struct mfd_cell max665x_devs[] = { > + { .name = "max6651-gpio", }, > + { .name = "max6650", }, /* hwmon driver */ What happened to renaming the hwmon driver, so we can have "max6650-hwmon" here? > +static const struct i2c_device_id max665x_id[] = { > + { "max6650", TYPE_MAX6650 }, > + { "max6651", TYPE_MAX6651 }, > + {}, Can you remind me where these IDs are being used? > +}; > +MODULE_DEVICE_TABLE(i2c, max665x_id); > + > +static struct i2c_driver max665x_driver = { > + .driver = { > + .name = "max665x", > + .owner = THIS_MODULE, All new drivers are required to support Device Tree. > +#ifndef __LINUX_MFD_MAX665X_PRIVATE_H > +#define __LINUX_MFD_MAX665X_PRIVATE_H > + > +#include > +#include What's this here for? > +#include > + > +struct max665x_dev { > + struct device *dev; > + struct mutex iolock; > + > + struct i2c_client *i2c; > + struct regmap *map; > + > + int type; > +}; > + > +enum max665x_types { > + TYPE_MAX6650, > + TYPE_MAX6651, > +}; > + > +#endif -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/