From patchwork Thu Mar 28 16:11: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: 15726 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 7649B23E10 for ; Thu, 28 Mar 2013 16:12:06 +0000 (UTC) Received: from mail-ve0-f178.google.com (mail-ve0-f178.google.com [209.85.128.178]) by fiordland.canonical.com (Postfix) with ESMTP id 0338AA184BD for ; Thu, 28 Mar 2013 16:12:05 +0000 (UTC) Received: by mail-ve0-f178.google.com with SMTP id db10so4287576veb.23 for ; Thu, 28 Mar 2013 09:12:05 -0700 (PDT) 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=4nxixdjlZInQ8A2q8XWVexMcSVlRX7yXevjqVy/w4d0=; b=HrYwVQwMKb7QRifxe14MjFYvIe7SC5TyJspZ9ARBgkpjhLTgfybPvXjqOjAp5GPK/e tK1MN9w6Pq4Tl52MUEb/GCJ7w7Kz8geQ+acsyw0UfSvOICKC6LCehZLQgNpc7+m2a6M1 BHsBpHaohzH+iwbKNGmTghRsTDqk/G6sGp5YkJkCXEDWcKkxpO/zVqIbhfPxBLWaDQB5 LvVq6JDns2g6eIXdNIv9Riy886Q1Xbc51fSSSjJMTvzmpRdSULTtx1tRjH0EKAl1vqha ZfDoD/0OwG7wvhZbqjtbVjxW0JUFLUHF8g5ELO4uuIAHUn3rW2MAxHjbpjVbi/vZJuGG M3AQ== X-Received: by 10.58.29.101 with SMTP id j5mr27869948veh.26.1364487125498; Thu, 28 Mar 2013 09:12:05 -0700 (PDT) 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.59.4.204 with SMTP id cg12csp22397ved; Thu, 28 Mar 2013 09:12:05 -0700 (PDT) X-Received: by 10.194.172.71 with SMTP id ba7mr39325598wjc.26.1364487124332; Thu, 28 Mar 2013 09:12:04 -0700 (PDT) Received: from mail-wg0-x229.google.com ([2a00:1450:400c:c00::229]) by mx.google.com with ESMTPS id em8si4321589wid.61.2013.03.28.09.12.04 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Mar 2013 09:12:04 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c00::229 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=2a00:1450:400c:c00::229; Authentication-Results: mx.google.com; spf=neutral (google.com: 2a00:1450:400c:c00::229 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-f41.google.com with SMTP id y10so1659788wgg.4 for ; Thu, 28 Mar 2013 09:12:04 -0700 (PDT) X-Received: by 10.194.83.33 with SMTP id n1mr39599765wjy.7.1364487123653; Thu, 28 Mar 2013 09:12:03 -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 o5sm16765926wix.3.2013.03.28.09.12.01 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Mar 2013 09:12:02 -0700 (PDT) From: Lee Jones To: linux-kernel@vger.kernel.org, broonie@opensource.wolfsonmicro.com Cc: Bengt Jonsson , Lee Jones Subject: [PATCH 07/33] regulator: ab8500-ext: Add suspend support Date: Thu, 28 Mar 2013 16:11:07 +0000 Message-Id: <1364487093-19551-8-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1364487093-19551-1-git-send-email-lee.jones@linaro.org> References: <1364487093-19551-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQlJ9DHvLvoeTwJEhhh1RiI9yixHNIs4u8UIa+kNxMJMAk/nmb5AoRC3q6+R1avut8CPZHF3 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 21b9bfb..95fe706 100644 --- a/drivers/regulator/ab8500-ext.c +++ b/drivers/regulator/ab8500-ext.c @@ -102,6 +102,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; @@ -147,6 +154,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; @@ -275,7 +289,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,