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: 14074 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 DE84F23E2E for ; Tue, 15 Jan 2013 12:57:09 +0000 (UTC) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by fiordland.canonical.com (Postfix) with ESMTP id 9A235A1931C for ; Tue, 15 Jan 2013 12:57:09 +0000 (UTC) Received: by mail-vc0-f176.google.com with SMTP id fo13so55845vcb.21 for ; Tue, 15 Jan 2013 04:57:09 -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=+gFDoFeFWY9V3ct9mYydwteFFMT8B1ntIK6coEmtLKw=; b=N/4z3GzZN9jXqphKp7QMBLW8UMBDCokJjLgw1w7l21Nl+7Fsi8wlKKMhzXqyCs1nnt 1xELJoOyv/fNznDzDcivfGPpfI8wVZDA3BnOesx8aJdeJsB3ZRG+9db1mVeQRz8vrFH9 Pkp6ZG6NDCcteTjgU46aDodA59YOYjxwoBsM7sEEKoiQ1rYHollSxpO6+TKATGSDYv5d c5Xjzn1wBkRjTbGRgoLJvgCA3uwa3eIzPbXPwFKWQLEbK73q5MmWmFL2eU37PpT5bltU tkHANQnLLrrrHAdHpzjpacJvaBR/AWEOOSMh57+SfgyMhxtENGjCBBwPDjXHLgHgkAQ/ NQOA== X-Received: by 10.52.88.168 with SMTP id bh8mr89831866vdb.51.1358254629148; Tue, 15 Jan 2013 04:57:09 -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.145.101 with SMTP id st5csp110636veb; Tue, 15 Jan 2013 04:57:08 -0800 (PST) X-Received: by 10.180.82.69 with SMTP id g5mr3613894wiy.21.1358254628266; Tue, 15 Jan 2013 04:57:08 -0800 (PST) Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by mx.google.com with ESMTPS id ew20si3380817wid.14.2013.01.15.04.57.07 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 15 Jan 2013 04:57:08 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.173 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=209.85.212.173; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.173 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-f173.google.com with SMTP id hn17so2271272wib.12 for ; Tue, 15 Jan 2013 04:57:07 -0800 (PST) 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 Cc: arnd@arndb.de, linus.walleij@stericsson.com, sameo@linux.intel.com, Jonas Aaberg , Lee Jones 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: ALoCoQm0zytBK9CMH/SzW4sNDMcR6+UFOmU4KmmexlFSkp+EjUOMHmaYjutA43CahC80q4WVpg82 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; }