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: 15484 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 10D5623E14 for ; Thu, 21 Mar 2013 16:00:22 +0000 (UTC) Received: from mail-ve0-f181.google.com (mail-ve0-f181.google.com [209.85.128.181]) by fiordland.canonical.com (Postfix) with ESMTP id BF132A191DF for ; Thu, 21 Mar 2013 16:00:21 +0000 (UTC) Received: by mail-ve0-f181.google.com with SMTP id pa12so1021495veb.26 for ; Thu, 21 Mar 2013 09:00:21 -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=QHxE1KOlFWTksnObPUqwWaxXMXUu5MyRbOo8daZaEHA=; b=QKN/mBx/5gMKouAJpyE15myf5KCjoFnc/Z4IhwzLB/p00oqi2pNXSrbe5nJMWq9ZJI ietUhj5OZvKJce7SNcYxVkcdA/KRJN4XuO8SVMtlktRQi4ygJALUk9gXkFRljNx07hGV zurG40fHMDtyfOvogiIlb13dgpbWmlagTSV/sHCmrrtFxQXIWhec2HeYhPg2hUjmXrZj Ptt4blr+kKsKpTdEDXVj6bu6Cgs8SVkrtngXu0iCTM1WkfnL8U7TbvnZCr05/qwfWwqJ V4U3HnWdrUzB9aJ+gi6utkG6spYBSjiH2a2/bVur41K1DldqEA+V6tXkHDuJWw5TupSA dISA== X-Received: by 10.52.76.103 with SMTP id j7mr12313202vdw.90.1363881620499; Thu, 21 Mar 2013 09:00:20 -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.58.233.198 with SMTP id ty6csp66761vec; Thu, 21 Mar 2013 09:00:20 -0700 (PDT) X-Received: by 10.180.92.167 with SMTP id cn7mr5229938wib.0.1363881619464; Thu, 21 Mar 2013 09:00:19 -0700 (PDT) Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) by mx.google.com with ESMTPS id l8si1426089wia.73.2013.03.21.09.00.19 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 21 Mar 2013 09:00:19 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.43 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.43; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.43 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-f43.google.com with SMTP id e12so2394976wge.10 for ; Thu, 21 Mar 2013 09:00:19 -0700 (PDT) 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 Cc: arnd@arndb.de, linus.walleij@stericsson.com, Bengt Jonsson , Lee Jones 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: ALoCoQm90Z/9OIEv47ZCLZHoBav0vIQdcA1I1hI/184NbpOU/07B50RBksESX40x0E9tIEnoVCCp 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,