All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Cc: Kukjin Kim <kgene.kim@samsung.com>,
	linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Doug Anderson <dianders@chromium.org>,
	Tomasz Figa <tomasz.figa@gmail.com>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	Mark Brown <broonie@kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 1/2] Revert "mfd: sec-core: Prepare regulators for suspend state to reduce power-consumption"
Date: Tue, 21 Oct 2014 12:56:09 +0100	[thread overview]
Message-ID: <20141021115609.GA4127@x1> (raw)
In-Reply-To: <1413839151-10875-2-git-send-email-javier.martinez@collabora.co.uk>

On Mon, 20 Oct 2014, Javier Martinez Canillas wrote:

> This reverts commit b7cde7078d2344073c310aa65fc2b0a845d2cb5b
> ("mfd: sec-core: Prepare regulators for suspend state to reduce power-consumption")
> 
> Commit b7cde7078d23 called regulator_suspend_prepare() to prepare the
> regulators for a suspend state. But it did from the device pm suspend
> handler while the regulator suspend prepare function iterates over all
> regulators and not only the one managed by this device so it doesn't
> seems to be correct to call it from within a device driver.
> 
> It is better to call the regulator suspend prepare/finish functions
> from platform code instead so this patch reverts the mentioned commit.
> 
> Suggested-by: Doug Anderson <dianders@chromium.org>
> Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
> ---
>  drivers/mfd/Kconfig    |  1 -
>  drivers/mfd/sec-core.c | 10 ----------
>  2 files changed, 11 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index 1456ea7..fd8cc4c 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -655,7 +655,6 @@ config MFD_SEC_CORE
>  	select MFD_CORE
>  	select REGMAP_I2C
>  	select REGMAP_IRQ
> -	select REGULATOR
>  	help
>  	 Support for the Samsung Electronics MFD series.
>  	 This driver provides common support for accessing the device,
> diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c
> index dba7e2b..5993608 100644
> --- a/drivers/mfd/sec-core.c
> +++ b/drivers/mfd/sec-core.c
> @@ -31,7 +31,6 @@
>  #include <linux/mfd/samsung/s2mpu02.h>
>  #include <linux/mfd/samsung/s5m8763.h>
>  #include <linux/mfd/samsung/s5m8767.h>
> -#include <linux/regulator/machine.h>
>  #include <linux/regmap.h>
>  
>  static const struct mfd_cell s5m8751_devs[] = {
> @@ -432,15 +431,6 @@ static int sec_pmic_suspend(struct device *dev)
>  	 */
>  	disable_irq(sec_pmic->irq);
>  
> -	switch (sec_pmic->device_type) {
> -	case S2MPS14X:
> -	case S2MPU02:
> -		regulator_suspend_prepare(PM_SUSPEND_MEM);
> -		break;
> -	default:
> -		break;
> -	}
> -
>  	return 0;
>  }
>  

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

WARNING: multiple messages have this Message-ID (diff)
From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/2] Revert "mfd: sec-core: Prepare regulators for suspend state to reduce power-consumption"
Date: Tue, 21 Oct 2014 12:56:09 +0100	[thread overview]
Message-ID: <20141021115609.GA4127@x1> (raw)
In-Reply-To: <1413839151-10875-2-git-send-email-javier.martinez@collabora.co.uk>

On Mon, 20 Oct 2014, Javier Martinez Canillas wrote:

> This reverts commit b7cde7078d2344073c310aa65fc2b0a845d2cb5b
> ("mfd: sec-core: Prepare regulators for suspend state to reduce power-consumption")
> 
> Commit b7cde7078d23 called regulator_suspend_prepare() to prepare the
> regulators for a suspend state. But it did from the device pm suspend
> handler while the regulator suspend prepare function iterates over all
> regulators and not only the one managed by this device so it doesn't
> seems to be correct to call it from within a device driver.
> 
> It is better to call the regulator suspend prepare/finish functions
> from platform code instead so this patch reverts the mentioned commit.
> 
> Suggested-by: Doug Anderson <dianders@chromium.org>
> Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
> ---
>  drivers/mfd/Kconfig    |  1 -
>  drivers/mfd/sec-core.c | 10 ----------
>  2 files changed, 11 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index 1456ea7..fd8cc4c 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -655,7 +655,6 @@ config MFD_SEC_CORE
>  	select MFD_CORE
>  	select REGMAP_I2C
>  	select REGMAP_IRQ
> -	select REGULATOR
>  	help
>  	 Support for the Samsung Electronics MFD series.
>  	 This driver provides common support for accessing the device,
> diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c
> index dba7e2b..5993608 100644
> --- a/drivers/mfd/sec-core.c
> +++ b/drivers/mfd/sec-core.c
> @@ -31,7 +31,6 @@
>  #include <linux/mfd/samsung/s2mpu02.h>
>  #include <linux/mfd/samsung/s5m8763.h>
>  #include <linux/mfd/samsung/s5m8767.h>
> -#include <linux/regulator/machine.h>
>  #include <linux/regmap.h>
>  
>  static const struct mfd_cell s5m8751_devs[] = {
> @@ -432,15 +431,6 @@ static int sec_pmic_suspend(struct device *dev)
>  	 */
>  	disable_irq(sec_pmic->irq);
>  
> -	switch (sec_pmic->device_type) {
> -	case S2MPS14X:
> -	case S2MPU02:
> -		regulator_suspend_prepare(PM_SUSPEND_MEM);
> -		break;
> -	default:
> -		break;
> -	}
> -
>  	return 0;
>  }
>  

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  parent reply	other threads:[~2014-10-21 11:56 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-20 21:05 [PATCH v3 0/2] ARM: EXYNOS: Call regulator suspend prepare/finish Javier Martinez Canillas
2014-10-20 21:05 ` Javier Martinez Canillas
2014-10-20 21:05 ` [PATCH v3 1/2] Revert "mfd: sec-core: Prepare regulators for suspend state to reduce power-consumption" Javier Martinez Canillas
2014-10-20 21:05   ` Javier Martinez Canillas
2014-10-20 21:41   ` Doug Anderson
2014-10-20 21:41     ` Doug Anderson
2014-10-20 23:41   ` Chanwoo Choi
2014-10-20 23:41     ` Chanwoo Choi
2014-10-21 11:56   ` Lee Jones [this message]
2014-10-21 11:56     ` Lee Jones
2014-10-20 21:05 ` [PATCH v3 2/2] ARM: EXYNOS: Call regulator core suspend prepare and finish functions Javier Martinez Canillas
2014-10-20 21:05   ` Javier Martinez Canillas
2014-10-20 21:40   ` Doug Anderson
2014-10-20 21:40     ` Doug Anderson
2014-10-20 21:47     ` Javier Martinez Canillas
2014-10-20 21:47       ` Javier Martinez Canillas
2014-10-30 10:06   ` Javier Martinez Canillas
2014-10-30 10:06     ` Javier Martinez Canillas
2014-11-11 10:23     ` Javier Martinez Canillas
2014-11-11 10:23       ` Javier Martinez Canillas
2014-11-12 17:02       ` Olof Johansson
2014-11-12 17:02         ` Olof Johansson
2014-11-13  2:12         ` Kukjin Kim
2014-11-13  2:12           ` Kukjin Kim
2014-11-13  8:36           ` Javier Martinez Canillas
2014-11-13  8:36             ` Javier Martinez Canillas
2014-10-21  7:24 ` [PATCH v3 0/2] ARM: EXYNOS: Call regulator suspend prepare/finish Krzysztof Kozłowski
2014-10-21  7:24   ` Krzysztof Kozłowski

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=20141021115609.GA4127@x1 \
    --to=lee.jones@linaro.org \
    --cc=broonie@kernel.org \
    --cc=cw00.choi@samsung.com \
    --cc=dianders@chromium.org \
    --cc=javier.martinez@collabora.co.uk \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=tomasz.figa@gmail.com \
    /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.