From patchwork Thu Mar 21 15:59:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 2315221 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 8FCCD400E6 for ; Thu, 21 Mar 2013 16:37:15 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UIiR9-0003eS-R3; Thu, 21 Mar 2013 16:33:55 +0000 Received: from mail-we0-x232.google.com ([2a00:1450:400c:c03::232]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UIhvl-0001Uq-Dp for linux-arm-kernel@lists.infradead.org; Thu, 21 Mar 2013 16:01:31 +0000 Received: by mail-we0-f178.google.com with SMTP id o45so2604485wer.9 for ; Thu, 21 Mar 2013 09:01:24 -0700 (PDT) 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=hpqwLYsy+DxT3J7f3GsJF54raiEAl8USC0JxfVAAFNo=; b=J6mxaPhPDQ5QJrMZfFEW2DZm94uQOO7J9CS4dmq9SgeEI4JDIbQqvMlRKZ8eFTaKE7 DaSKnTobjk8PGPeXw76wKkqB9TEtLyxIUif+4TAtAtjXYtsBX+PGXuc3pByhNgwct3rb XMw40VcCEZokf28YdiMtGDq6ormqpNfqK43IEfmnk2iS3jxp/Zx7MyfZrytNzeGBOukn 4hOHI7tOtxCbCrPXX4FcGxOQTfzO4ORwUfoEtbNAiVfkrWesBhahiNDAUua8wNeKRnZg uPOvyVf9ukdIhV3Hl/rZUEpRwlvyIav/A2yuzv1j94mAnK7gsYdE8Z8qCyUDb/ByGCxB SYqg== X-Received: by 10.194.120.195 with SMTP id le3mr3916890wjb.46.1363881684313; Thu, 21 Mar 2013 09:01:24 -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.01.22 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 21 Mar 2013 09:01:23 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, broonie@opensource.wolfsonmicro.com Subject: [PATCH 41/46] regulator: ab8500: Remove the need for a 'delay' property Date: Thu, 21 Mar 2013 15:59:38 +0000 Message-Id: <1363881583-15234-42-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: ALoCoQnjbXKp/DTT53AN6FhLsaFxdSTkdJyGBftyy5extxxZviQF97RpLl8IGMSI4jB7Xxj/sAvl X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130321_120129_732139_8886E6BF X-CRM114-Status: GOOD ( 11.76 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Lee Jones , linus.walleij@stericsson.com, arnd@arndb.de X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The regulator framework now has provisions to read a regulator's start-up time via the 'enable_time' attribute. So let's remove all 'enable_time'/'delay' duplication and just stick with 'enable_time' from now on. Signed-off-by: Lee Jones --- drivers/regulator/ab8500.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c index 324444e..13948c8 100644 --- a/drivers/regulator/ab8500.c +++ b/drivers/regulator/ab8500.c @@ -63,7 +63,6 @@ struct ab8500_shared_mode { * @voltage_reg: register to control regulator voltage * @voltage_mask: mask to control regulator voltage * @voltage_shift: shift to control regulator voltage - * @delay: startup/set voltage delay in us */ struct ab8500_regulator_info { struct device *dev; @@ -87,7 +86,6 @@ struct ab8500_regulator_info { u8 voltage_reg; u8 voltage_mask; u8 voltage_shift; - unsigned int delay; struct { u8 voltage_limit; u8 voltage_bank; @@ -652,7 +650,7 @@ static int ab8500_regulator_set_voltage_time_sel(struct regulator_dev *rdev, { struct ab8500_regulator_info *info = rdev_get_drvdata(rdev); - return info->delay; + return info->desc.enable_time; } static struct regulator_ops ab8500_regulator_volt_mode_ops = { @@ -829,7 +827,6 @@ static struct ab8500_regulator_info .volt_table = fixed_2000000_voltage, .enable_time = 500, }, - .delay = 500, .load_lp_uA = 1000, .update_bank = 0x03, .update_reg = 0x80, @@ -1100,7 +1097,6 @@ static struct ab8500_regulator_info .volt_table = fixed_2000000_voltage, .enable_time = 10000, }, - .delay = 10000, .load_lp_uA = 1000, .update_bank = 0x03, .update_reg = 0x80, @@ -1366,7 +1362,6 @@ static struct ab8500_regulator_info .volt_table = fixed_2000000_voltage, .enable_time = 10000, }, - .delay = 10000, .load_lp_uA = 1000, .update_bank = 0x03, .update_reg = 0x80, @@ -1664,7 +1659,6 @@ static struct ab8500_regulator_info .n_voltages = 1, .enable_time = 10000, }, - .delay = 10000, .load_lp_uA = 1000, .update_bank = 0x03, .update_reg = 0x80,