From patchwork Mon Feb 4 11:53:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 14467 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 4E47323F96 for ; Mon, 4 Feb 2013 11:56:23 +0000 (UTC) Received: from mail-vb0-f53.google.com (mail-vb0-f53.google.com [209.85.212.53]) by fiordland.canonical.com (Postfix) with ESMTP id 02441A18F62 for ; Mon, 4 Feb 2013 11:56:22 +0000 (UTC) Received: by mail-vb0-f53.google.com with SMTP id fj18so3778168vbb.40 for ; Mon, 04 Feb 2013 03:56:22 -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=di1ztUo0RhENdPei2rJa2Hwm9oY8NVdJJQt0rKO+13M=; b=hLvJPX/P46jEqbgJ65ujL4K8eM+xObteL/IMDIYxCPuKGmhSx4yfeQWYi69+uPu848 g8OHIbT+fbq3JzfHvIJdNCdUUwFzGrVqDVb5jDGU04D4LX/bpJ53Uwo7+pPA+3WrCeFU cq7NwxWD8BKVZ7UDtoH4H6N7z2Lc7DTNZAWhWOxRInRm7DemqLFZZcjW9YdiB6rD/iRa llyG8mQcNoNJTOWxXAs9yxz0aYoG/DV7z6JDiLWQA0EQ2DQ8DjGNXsv4/eKFDrMnEizz VdffcvBjWDgC2Od6c1nbpaG+aFNXKNol5lzbhO3yNv8JQ0XIiLaoopV2WAUl2eHqLpOf arkg== X-Received: by 10.58.232.226 with SMTP id tr2mr17779281vec.48.1359978982471; Mon, 04 Feb 2013 03:56:22 -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 zo8csp83047vec; Mon, 4 Feb 2013 03:56:21 -0800 (PST) X-Received: by 10.194.109.102 with SMTP id hr6mr4464242wjb.24.1359978981460; Mon, 04 Feb 2013 03:56:21 -0800 (PST) Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) by mx.google.com with ESMTPS id ve9si5716111wjc.136.2013.02.04.03.56.21 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 04 Feb 2013 03:56:21 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.176 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=209.85.212.176; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.176 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-wi0-f176.google.com with SMTP id hm14so2762240wib.15 for ; Mon, 04 Feb 2013 03:56:21 -0800 (PST) X-Received: by 10.180.90.106 with SMTP id bv10mr9883715wib.12.1359978980974; Mon, 04 Feb 2013 03:56:20 -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 j9sm12937128wia.5.2013.02.04.03.56.19 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 04 Feb 2013 03:56:20 -0800 (PST) From: Lee Jones To: linux-kernel@vger.kernel.org, broonie@opensource.wolfsonmicro.com Cc: Bengt Jonsson , Lee Jones Subject: [PATCH 18/73] regulator: ab8500-ext: Add suspend support Date: Mon, 4 Feb 2013 11:53:33 +0000 Message-Id: <1359978868-28736-19-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1359978868-28736-1-git-send-email-lee.jones@linaro.org> References: <1359978868-28736-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQkBoiRH38tSUUCO0ed8t79vgWZmjmZhOgYbFGK7x1/G+0IvI2LKp8j2CDdVl6c5m949ekdt 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 5cb7d9c..29d5cd4 100644 --- a/drivers/regulator/ab8500-ext.c +++ b/drivers/regulator/ab8500-ext.c @@ -105,6 +105,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; @@ -150,6 +157,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; @@ -214,7 +228,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, .get_voltage = ab8500_ext_fixed_get_voltage, .list_voltage = ab8500_ext_list_voltage,