From patchwork Tue Jan 15 12:56:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 1977931 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 CA482DF264 for ; Tue, 15 Jan 2013 13:14:17 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Tv6Fq-0004M2-2n; Tue, 15 Jan 2013 13:08:41 +0000 Received: from mail-wg0-f45.google.com ([74.125.82.45]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Tv64j-0006kL-VU for linux-arm-kernel@lists.infradead.org; Tue, 15 Jan 2013 12:57:13 +0000 Received: by mail-wg0-f45.google.com with SMTP id dq12so42582wgb.12 for ; Tue, 15 Jan 2013 04:57:07 -0800 (PST) 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=+gFDoFeFWY9V3ct9mYydwteFFMT8B1ntIK6coEmtLKw=; b=LBocvpJ956tdk+kAwoDbF2hDJgO9WGqFw2zdL7+yMylTfg029ib4eVsjVHYbpBYCwY AOBs8B14n6P1tXrs+gdZ8iD1D6oLTPRaQg4sSgyLrMtBnKMIj/HeRimB3FtuDR25JbXh GBlXiZc5vELiRN4zNW84iy4oHVs9V06DAkh+IyzoyDdfFpmlMSxWXsTvhplaOj1t4aHp BT7MTJ0FABNaZkJo0wzmetn0wHq2KM0jSAaKIB22EsQEv8BWXU9N/Sztsh32/bRhZBf1 8YLi/I9ApvYo44kg7cj4U46s99yYAm/e94Ao28DF5PHrVySq3M5djykRAuPcFQ4ueW14 K8JQ== X-Received: by 10.180.85.165 with SMTP id i5mr3563901wiz.11.1358254627868; Tue, 15 Jan 2013 04:57:07 -0800 (PST) Received: from localhost.localdomain (cpc1-aztw13-0-0-cust473.18-1.cable.virginmedia.com. [77.102.241.218]) by mx.google.com with ESMTPS id eo10sm3672833wib.9.2013.01.15.04.57.06 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 15 Jan 2013 04:57:07 -0800 (PST) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 25/26] mfd: ab8500-gpadc: Reduce conversion timeout Date: Tue, 15 Jan 2013 12:56:05 +0000 Message-Id: <1358254566-12419-26-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1358254566-12419-1-git-send-email-lee.jones@linaro.org> References: <1358254566-12419-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQlfk4G144l8BljnLcZAXNFD7XnIlEkrQWiPFx57Wz/6PkLn6sST+1bQCrbj2wRXhifZ5J6j X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130115_075710_348040_ACE9F6C7 X-CRM114-Status: GOOD ( 12.27 ) 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.45 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Jonas Aaberg , Lee Jones , linus.walleij@stericsson.com, arnd@arndb.de, sameo@linux.intel.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Jonas Aaberg Reduce the conversion timeout from 2s to 0.5s Signed-off-by: Lee Jones Signed-off-by: Jonas Aaberg Reviewed-by: Karl KOMIEROWSKI --- drivers/mfd/ab8500-gpadc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/mfd/ab8500-gpadc.c b/drivers/mfd/ab8500-gpadc.c index 1fd8f78..a7a6c77 100644 --- a/drivers/mfd/ab8500-gpadc.c +++ b/drivers/mfd/ab8500-gpadc.c @@ -86,6 +86,8 @@ /* Time in ms before disabling regulator */ #define GPADC_AUDOSUSPEND_DELAY 1 +#define CONVERSION_TIME 500 /* ms */ + enum cal_channels { ADC_INPUT_VMAIN = 0, ADC_INPUT_BTEMP, @@ -372,7 +374,8 @@ int ab8500_gpadc_read_raw(struct ab8500_gpadc *gpadc, u8 channel) goto out; } /* wait for completion of conversion */ - if (!wait_for_completion_timeout(&gpadc->ab8500_gpadc_complete, 2*HZ)) { + if (!wait_for_completion_timeout(&gpadc->ab8500_gpadc_complete, + msecs_to_jiffies(CONVERSION_TIME))) { dev_err(gpadc->dev, "timeout: didn't receive GPADC conversion interrupt\n"); ret = -EINVAL; @@ -598,8 +601,6 @@ static int ab8500_gpadc_runtime_resume(struct device *dev) static int ab8500_gpadc_runtime_idle(struct device *dev) { - struct ab8500_gpadc *gpadc = dev_get_drvdata(dev); - pm_runtime_suspend(dev); return 0; }