All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: Laszlo Papp <lpapp@kde.org>
Cc: lee.jones@linaro.org, linus.walleij@linaro.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mfd: MAX6650/6651 support
Date: Mon, 10 Feb 2014 08:37:42 +0100	[thread overview]
Message-ID: <1392017862.4594.3.camel@AMDC1943> (raw)
In-Reply-To: <1391859219-3102-1-git-send-email-lpapp@kde.org>

Hi,

On Sat, 2014-02-08 at 11:33 +0000, Laszlo Papp wrote:
> 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 <lpapp@kde.org>
> ---
>  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..e25be62 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 provies common support

s/provies/provides/

(...)


> +const struct regmap_config max665x_regmap_config = {
> +	.reg_bits = 5,
> +};
> +
> +static int max665x_probe(struct i2c_client *i2c,
> +			    const struct i2c_device_id *id)
> +{
> +	struct max665x_dev *max665x;
> +	int ret;
> +
> +	max665x = devm_kzalloc(&i2c->dev, sizeof(*max665x), GFP_KERNEL);
> +	if (!max665x)
> +		return -ENOMEM;
> +
> +	i2c_set_clientdata(i2c, max665x);
> +	max665x->dev = &i2c->dev;
> +	max665x->i2c = i2c;
> +	max665x->map = regmap_init_i2c(i2c, &max665x_regmap_config);

Use devm_regmap_init_i2c() (or add missing regmap_exit()).


Best regards,
Krzysztof



  parent reply	other threads:[~2014-02-10  7:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-08 11:33 [PATCH v2] mfd: MAX6650/6651 support Laszlo Papp
2014-02-09 19:50 ` Laszlo Papp
2014-02-10  7:37 ` Krzysztof Kozlowski [this message]
2014-02-10  7:46   ` Laszlo Papp
2014-02-10 12:02 ` Sachin Kamat
2014-02-10 12:21   ` Lee Jones
2014-02-10 15:20     ` Sachin Kamat
2014-02-10 15:56       ` Lee Jones
2014-02-10 18:36       ` Laszlo Papp
     [not found]   ` <CAOMwXhNmjehcd+aiWGuKs7CijheXXngsXTHMfG9SDLpHO=KaPw@mail.gmail.com>
2014-02-10 15:22     ` Sachin Kamat
2014-02-11 10:10       ` Laszlo Papp
2014-02-11 11:14         ` Sachin Kamat
2014-02-11 11:39           ` Laszlo Papp
2014-02-11 11:42             ` Sachin Kamat
2014-02-11 12:23               ` Laszlo Papp
2014-02-11 12:28                 ` Lee Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1392017862.4594.3.camel@AMDC1943 \
    --to=k.kozlowski@samsung.com \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lpapp@kde.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.