From patchwork Wed Feb 6 10:53:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 14591 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id CC3722423C for ; Wed, 6 Feb 2013 10:55:11 +0000 (UTC) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by fiordland.canonical.com (Postfix) with ESMTP id 7ED7BA187B7 for ; Wed, 6 Feb 2013 10:55:11 +0000 (UTC) Received: by mail-ve0-f169.google.com with SMTP id 15so1052318vea.0 for ; Wed, 06 Feb 2013 02:55:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=OxYD0K5UAeG6u4uRk1YAdVE6VbdMMZD/+Z4rcL7btjo=; b=TVIleAsS28k5qwxwoxlVN9atcLk8B7bzx8PH7uYUTB7p7xcSUmZI7+PgeA93S0Igyp oV7gmZH9hmPZRCh+VElEtNVSCuGyjJ9YqoRox5YKMRTK+2hPp3c1sxWJebgHzM8BECYF XYhjINCK7y4g45MjHsDmbyquPfElv8XiPTF8ER3cphKHNhuRoLDlVFmZF+M2JVJ8UASz s9Lq4b/ooKyVJPg6MgEZhQY7XzAhu5JSrdqktoLTJwEZ0rPzxlNMZtKDWqh8biiNrdza YqR7qfiIzv4ImP8RPclsYJlWxc5Ayti4kwbGicYDjXzO95p0jI7PF8x+n0pgh2Id2wjr YgEQ== X-Received: by 10.52.21.146 with SMTP id v18mr27868603vde.79.1360148111057; Wed, 06 Feb 2013 02:55:11 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.252.8 with SMTP id zo8csp12947vec; Wed, 6 Feb 2013 02:55:10 -0800 (PST) X-Received: by 10.194.20.231 with SMTP id q7mr48805931wje.44.1360148093514; Wed, 06 Feb 2013 02:54:53 -0800 (PST) Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com [74.125.82.53]) by mx.google.com with ESMTPS id x13si8556330wjr.57.2013.02.06.02.54.53 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 06 Feb 2013 02:54:53 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.53 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.53; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.53 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-wg0-f53.google.com with SMTP id fn15so999131wgb.32 for ; Wed, 06 Feb 2013 02:54:53 -0800 (PST) X-Received: by 10.180.85.226 with SMTP id k2mr4027413wiz.34.1360148090393; Wed, 06 Feb 2013 02:54:50 -0800 (PST) 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 be1sm2406649wib.10.2013.02.06.02.54.49 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 06 Feb 2013 02:54:50 -0800 (PST) From: Lee Jones To: linux-kernel@vger.kernel.org Cc: broonie@opensource.wolfsonmicro.com, linus.walleij@linaro.org, Bengt Jonsson , Lee Jones Subject: [PATCH 12/49] regulator: ab8500-ext: Add suspend support Date: Wed, 6 Feb 2013 10:53:34 +0000 Message-Id: <1360148051-7560-13-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1360148051-7560-1-git-send-email-lee.jones@linaro.org> References: <1360148051-7560-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQmD8UvRYa/O6UNgrpOXx3GPVkJYFVeBfL70gYctmncjMlODFFKQK0ajtQfrbI722dRRprKT 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,