From patchwork Mon Oct 20 21:05:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 5107871 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D56099F30B for ; Mon, 20 Oct 2014 21:09:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 129BE20179 for ; Mon, 20 Oct 2014 21:09:19 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 320832008F for ; Mon, 20 Oct 2014 21:09:18 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XgKAM-000264-Us; Mon, 20 Oct 2014 21:06:58 +0000 Received: from bhuna.collabora.co.uk ([93.93.135.160]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XgKAA-00022W-Q5 for linux-arm-kernel@lists.infradead.org; Mon, 20 Oct 2014 21:06:47 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: javier) with ESMTPSA id 48DEE600D0D From: Javier Martinez Canillas To: Kukjin Kim Subject: [PATCH v3 1/2] Revert "mfd: sec-core: Prepare regulators for suspend state to reduce power-consumption" Date: Mon, 20 Oct 2014 23:05:50 +0200 Message-Id: <1413839151-10875-2-git-send-email-javier.martinez@collabora.co.uk> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1413839151-10875-1-git-send-email-javier.martinez@collabora.co.uk> References: <1413839151-10875-1-git-send-email-javier.martinez@collabora.co.uk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141020_140647_004558_8F72134E X-CRM114-Status: GOOD ( 12.65 ) X-Spam-Score: -1.4 (-) Cc: linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Doug Anderson , Tomasz Figa , Chanwoo Choi , Mark Brown , Javier Martinez Canillas , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Javier Martinez Canillas Reviewed-by: Doug Anderson Reviewed-by: Chanwoo Choi --- drivers/mfd/Kconfig | 1 - drivers/mfd/sec-core.c | 10 ---------- 2 files changed, 11 deletions(-) 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 #include #include -#include #include 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; }