From patchwork Thu Mar 21 15:59:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 2314771 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id CDE3CDF264 for ; Thu, 21 Mar 2013 16:18:24 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UIi9G-0008SZ-Sp; Thu, 21 Mar 2013 16:15:27 +0000 Received: from mail-wg0-f50.google.com ([74.125.82.50]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UIhug-00013Q-Bo for linux-arm-kernel@lists.infradead.org; Thu, 21 Mar 2013 16:00:29 +0000 Received: by mail-wg0-f50.google.com with SMTP id es5so124084wgb.5 for ; Thu, 21 Mar 2013 09:00:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=QHxE1KOlFWTksnObPUqwWaxXMXUu5MyRbOo8daZaEHA=; b=CyU4N92ofCbBoqhDG8Lp8GvfTnK4/1cbmdDxPnqifG1admIAhp3MHJfIzbMQde84rE 7oPU6VguuTMgKFPAi2a6rAgWsgLJ0IReceVsIRWHZw/M25Zvp7jVJLmFtVDVFuTV1w9s KxS4cBNivcMm3sFy1rBo5pfcd1CcqWknGZnLomfe85/rJsNTmJnIiiA01wWT7vkhN+ga 1QxDgPKeOMbBbG6+kQaWifsI1sPrRdzIlnKaSflRqyiq4A6LtM0kq4BhOSNqupb4XApG oZhsNH/cACHvQ3XbidfsYnBPERuuE8FBI+i/HJexD0XT8v52/cM4aJ2yVjz0FrtQ8Tcl EP4A== X-Received: by 10.180.189.205 with SMTP id gk13mr3184196wic.25.1363881618879; Thu, 21 Mar 2013 09:00:18 -0700 (PDT) Received: from localhost.localdomain (cpc34-aztw25-2-0-cust250.18-1.cable.virginmedia.com. [86.16.136.251]) by mx.google.com with ESMTPS id h10sm6110847wic.8.2013.03.21.09.00.16 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 21 Mar 2013 09:00:17 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, broonie@opensource.wolfsonmicro.com Subject: [PATCH 10/46] regulator: ab8500-ext: Add suspend support Date: Thu, 21 Mar 2013 15:59:07 +0000 Message-Id: <1363881583-15234-11-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1363881583-15234-1-git-send-email-lee.jones@linaro.org> References: <1363881583-15234-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQmc+jY60KLT7WRnSHcP4cn4q9vcJxCWbAOWSFFoXE9oP0M+RQbYtKJ43O4p2n3dgg4p9tqd X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130321_120022_588853_A691E980 X-CRM114-Status: UNSURE ( 9.79 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.50 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Lee Jones , linus.walleij@stericsson.com, arnd@arndb.de, Bengt Jonsson X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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 From: Bengt Jonsson Operations regulator_suspend_enable and regulator_suspend_disable are added. Signed-off-by: Bengt Jonsson Signed-off-by: Lee Jones Reviewed-by: Mattias NILSSON Reviewed-by: Jonas ABERG --- drivers/regulator/ab8500-ext.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/regulator/ab8500-ext.c b/drivers/regulator/ab8500-ext.c index 303c02c..3af40fd 100644 --- a/drivers/regulator/ab8500-ext.c +++ b/drivers/regulator/ab8500-ext.c @@ -104,6 +104,13 @@ static int ab8500_ext_regulator_enable(struct regulator_dev *rdev) return ret; } +static int ab8500_ext_regulator_set_suspend_enable(struct regulator_dev *rdev) +{ + dev_dbg(rdev_get_dev(rdev), "suspend: "); + + return ab8500_ext_regulator_enable(rdev); +} + static int disable(struct ab8500_ext_regulator_info *info, u8 *regval) { int ret; @@ -149,6 +156,13 @@ static int ab8500_ext_regulator_disable(struct regulator_dev *rdev) return ret; } +static int ab8500_ext_regulator_set_suspend_disable(struct regulator_dev *rdev) +{ + dev_dbg(rdev_get_dev(rdev), "suspend: "); + + return ab8500_ext_regulator_disable(rdev); +} + static int ab8500_ext_regulator_is_enabled(struct regulator_dev *rdev) { int ret; @@ -274,7 +288,9 @@ static int ab8500_ext_list_voltage(struct regulator_dev *rdev, static struct regulator_ops ab8500_ext_regulator_ops = { .enable = ab8500_ext_regulator_enable, + .set_suspend_enable = ab8500_ext_regulator_set_suspend_enable, .disable = ab8500_ext_regulator_disable, + .set_suspend_disable = ab8500_ext_regulator_set_suspend_disable, .is_enabled = ab8500_ext_regulator_is_enabled, .set_mode = ab8500_ext_regulator_set_mode, .get_mode = ab8500_ext_regulator_get_mode,