All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sachin Kamat <sachin.kamat@linaro.org>
To: Laszlo Papp <lpapp@kde.org>
Cc: Lee Jones <lee.jones@linaro.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Krzysztof Kozlowski <k.kozlowski@samsung.com>,
	jdelvare@suse.de, Guenter Roeck <linux@roeck-us.net>
Subject: Re: [PATCH v6] mfd: MAX6650/6651 support
Date: Wed, 12 Feb 2014 10:12:12 +0530	[thread overview]
Message-ID: <CAK9yfHztuCSBSJUjc1xcf-f+O+kaKQQ=ExpWB-LoCkLoaZPfWA@mail.gmail.com> (raw)
In-Reply-To: <1392177760-17959-1-git-send-email-lpapp@kde.org>

Hi Laszlo,

Sorry for missing out on a couple of points during my earlier review.
Please see inline.

On 12 February 2014 09:32, Laszlo Papp <lpapp@kde.org> 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>
> ---
[snip]

> --- /dev/null
> +++ b/drivers/mfd/max665x.c
> @@ -0,0 +1,87 @@
> +/*
> + * Device access for MAX6650-MAX6651
> + *
> + * Copyright(c) 2013 Polatis Ltd.
> + *
> + * Author: Laszlo Papp <laszlo.papp@polatis.com>
> + *
> + *  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 <linux/device.h>
> +#include <linux/mfd/core.h>
> +#include <linux/module.h>
> +#include <linux/i2c.h>
> +
> +#include <linux/mfd/max665x-private.h>
> +
> +static struct mfd_cell max665x_devs[] = {
> +       { .name = "max6651-gpio", },
> +       { .name = "max6650", }, /* hwmon driver */
> +       {},
> +};
> +
> +const struct regmap_config max665x_regmap_config = {
> +       .reg_bits = 5,
> +};

This should be static.

> +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 = devm_regmap_init_i2c(i2c, &max665x_regmap_config);

Don't you need to check the return value of devm_regmap_init_i2c?

-- 
With warm regards,
Sachin

  reply	other threads:[~2014-02-12  4:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-12  4:02 [PATCH v6] mfd: MAX6650/6651 support Laszlo Papp
2014-02-12  4:42 ` Sachin Kamat [this message]
2014-02-12  7:06   ` Laszlo Papp
2014-02-12  8:32     ` Lee Jones
2014-02-12  9:34       ` Laszlo Papp
2014-02-12 17:50 ` Mark Brown
2014-02-13  8:23   ` Lee Jones
2014-02-13  9:14     ` Laszlo Papp
2014-02-13 10:26       ` Mark Brown
2014-02-13 10:34       ` Laszlo Papp
2014-02-14  9:02   ` Laszlo Papp
2014-02-14 10:19     ` Lee Jones
2014-02-14 10:59       ` Laszlo Papp
2014-02-14 20:57     ` Mark Brown
2014-02-17  8:55       ` Laszlo Papp

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='CAK9yfHztuCSBSJUjc1xcf-f+O+kaKQQ=ExpWB-LoCkLoaZPfWA@mail.gmail.com' \
    --to=sachin.kamat@linaro.org \
    --cc=jdelvare@suse.de \
    --cc=k.kozlowski@samsung.com \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --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.