The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: Sachin Kamat <sachin.kamat@linaro.org>
Cc: linux-kernel@vger.kernel.org, lee.jones@linaro.org
Subject: Re: [PATCH v3 Resend 2/3] regulator: Add support for S2MPA01 regulator
Date: Thu, 06 Mar 2014 11:40:06 +0100	[thread overview]
Message-ID: <1394102406.25853.4.camel@AMDC1943> (raw)
In-Reply-To: <1394100057-32677-2-git-send-email-sachin.kamat@linaro.org>

On Thu, 2014-03-06 at 15:30 +0530, Sachin Kamat wrote:
> Add support for S2MPA01 voltage and current regulator.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> Acked-by: Mark Brown <broonie@linaro.org>
> ---
>  drivers/regulator/Kconfig   |    7 +
>  drivers/regulator/Makefile  |    1 +
>  drivers/regulator/s2mpa01.c |  483 +++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 491 insertions(+)
>  create mode 100644 drivers/regulator/s2mpa01.c
> 
> diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
> index 4ddfb6c065c7..5b08ea927870 100644
> --- a/drivers/regulator/Kconfig
> +++ b/drivers/regulator/Kconfig
> @@ -425,6 +425,13 @@ config REGULATOR_RC5T583
>  	  through regulator interface. The device supports multiple DCDC/LDO
>  	  outputs which can be controlled by i2c communication.
>  
> +config REGULATOR_S2MPA01
> +	tristate "Samsung S2MPA01 voltage regulator"
> +	depends on MFD_SEC_CORE
> +	help
> +	 This driver controls Samsung S2MPA01 voltage output regulator
> +	 via I2C bus. S2MPA01 has 10 Bucks and 26 LDO outputs.
> +
>  config REGULATOR_S2MPS11
>  	tristate "Samsung S2MPS11 voltage regulator"
>  	depends on MFD_SEC_CORE
> diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile
> index c624dbcdcc76..2d14f7580304 100644
> --- a/drivers/regulator/Makefile
> +++ b/drivers/regulator/Makefile
> @@ -58,6 +58,7 @@ obj-$(CONFIG_REGULATOR_PBIAS) += pbias-regulator.o
>  obj-$(CONFIG_REGULATOR_PCAP) += pcap-regulator.o
>  obj-$(CONFIG_REGULATOR_PCF50633) += pcf50633-regulator.o
>  obj-$(CONFIG_REGULATOR_RC5T583)  += rc5t583-regulator.o
> +obj-$(CONFIG_REGULATOR_S2MPA01) += s2mpa01.o
>  obj-$(CONFIG_REGULATOR_S2MPS11) += s2mps11.o
>  obj-$(CONFIG_REGULATOR_S5M8767) += s5m8767.o
>  obj-$(CONFIG_REGULATOR_STW481X_VMMC) += stw481x-vmmc.o
> diff --git a/drivers/regulator/s2mpa01.c b/drivers/regulator/s2mpa01.c
> new file mode 100644
> index 000000000000..6ac6e8205a05
> --- /dev/null
> +++ b/drivers/regulator/s2mpa01.c
> @@ -0,0 +1,483 @@
> +/*
> + * Copyright (c) 2013 Samsung Electronics Co., Ltd
> + *		http://www.samsung.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/bug.h>
> +#include <linux/err.h>
> +#include <linux/gpio.h>
> +#include <linux/slab.h>
> +#include <linux/module.h>
> +#include <linux/of.h>
> +#include <linux/regmap.h>
> +#include <linux/platform_device.h>
> +#include <linux/regulator/driver.h>
> +#include <linux/regulator/machine.h>
> +#include <linux/regulator/of_regulator.h>
> +#include <linux/mfd/samsung/core.h>
> +#include <linux/mfd/samsung/s2mpa01.h>
> +
> +#define S2MPA01_REGULATOR_CNT ARRAY_SIZE(regulators)
> +
> +struct s2mpa01_info {
> +	struct regulator_dev *rdev[S2MPA01_REGULATOR_MAX];

Hi,

It seems that s2mpa01_info->rdev is not used anywhere, except as return
value of devm_regulator_register. I think you can remove it completely.

Beside that, can this driver be merged into existing s2mps11 regulator
driver?

Best regards,
Krzysztof




  reply	other threads:[~2014-03-06 10:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-06 10:00 [PATCH v3 Resend 1/3] mfd: Add support for S2MPA01 device Sachin Kamat
2014-03-06 10:00 ` [PATCH v3 Resend 2/3] regulator: Add support for S2MPA01 regulator Sachin Kamat
2014-03-06 10:40   ` Krzysztof Kozlowski [this message]
2014-03-06 11:22     ` Sachin Kamat
2014-03-10  9:35       ` Lee Jones
2014-03-10  9:56         ` Sachin Kamat
2014-03-10 10:38           ` Lee Jones
2014-03-10 10:39             ` Lee Jones
2014-03-10 10:42               ` Sachin Kamat
2014-03-06 10:00 ` [PATCH v3 Resend 3/3] Documentation: mfd: Add binding document for S2MPA01 Sachin Kamat

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=1394102406.25853.4.camel@AMDC1943 \
    --to=k.kozlowski@samsung.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sachin.kamat@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox