From patchwork Thu Jun 2 10:23:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 69141 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp38110qgf; Thu, 2 Jun 2016 03:23:52 -0700 (PDT) X-Received: by 10.66.153.209 with SMTP id vi17mr4505038pab.0.1464863032208; Thu, 02 Jun 2016 03:23:52 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 26si57506310pfs.107.2016.06.02.03.23.51; Thu, 02 Jun 2016 03:23:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932456AbcFBKXu (ORCPT + 30 others); Thu, 2 Jun 2016 06:23:50 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:35814 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750754AbcFBKXq (ORCPT ); Thu, 2 Jun 2016 06:23:46 -0400 Received: by mail-wm0-f54.google.com with SMTP id a136so222800306wme.0 for ; Thu, 02 Jun 2016 03:23:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=JADToGoiAJiFH1p4DOUCnbV4wcKpkZpkVkTTR/a2nWQ=; b=eWb9M1mJNqa9bTneA1khDoGIY+cLxQj0Y4vTp9a5ICNtTwwttZ1MJRtOV0kg2M4fto gCNChgcQkyYHs7XlBynnA9HrPayCxcSfdtddeSRWGgtacAIEOeIIfNQhvkZzosRwL90f EiKDNgUaT+6y6848QoXtJRLiKpgZGYderwajw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=JADToGoiAJiFH1p4DOUCnbV4wcKpkZpkVkTTR/a2nWQ=; b=MJIBOpgl5NYjZriWGo7syX1KpmmCcYJqUss6nrkmPmZ1HhnsguifMXZnbI0rwu4ajy PmBrRJqtKy547raS9pEUBoU8TlTYv2tImA7ZsmE9NL8N75NvayO9g+q09OcjLKoLXK3L fv8i/ZJcR3ab8iIs9b+v4rUb1rBCk6IRZ/rcWskW5eYNu82Ew7pVzr9N8ZzDFxsz5L00 fedVWYE8NsHGF3fTTYXoy8Ej3kYa8jKbcMg42EPXnluMiE8lbqxiwjHM0HoqqXzX4u3z Tvh7M0B3855llRqBp7bPA39Pbh21mGSG98JxyToPfMCiTVI4HpQuIhlKSrbvVaH+MjAA 1KOw== X-Gm-Message-State: ALyK8tLSL4wniNjrNqFDO+6VzUghTt9Chpu48xsnxhdGJpHDUG9JqZJHZd48mec8cubkL5Q9 X-Received: by 10.194.206.39 with SMTP id ll7mr7662609wjc.179.1464863025536; Thu, 02 Jun 2016 03:23:45 -0700 (PDT) Received: from localhost.localdomain (host-92-17-247-99.as13285.net. [92.17.247.99]) by smtp.gmail.com with ESMTPSA id t3sm39637107wmf.20.2016.06.02.03.23.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 02 Jun 2016 03:23:44 -0700 (PDT) From: Srinivas Kandagatla To: bjorn.andersson@linaro.org, Mark Brown Cc: linux-kernel@vger.kernel.org, Liam Girdwood , linux-arm-msm@vger.kernel.org, Srinivas Kandagatla Subject: [RFC PATCH v1 3/3] regulator: qcom_smd: add linear range to pm8941 lnldo Date: Thu, 2 Jun 2016 11:23:16 +0100 Message-Id: <1464862996-3147-4-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1464862996-3147-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1464862996-3147-1-git-send-email-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch converts a fixed voltage pm8941 lnldo to a single step linear range regulator, so that we could use the same list_volatage callback without BUG_ON from regulator core. Signed-off-by: Srinivas Kandagatla --- drivers/regulator/qcom_smd-regulator.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.8.2 diff --git a/drivers/regulator/qcom_smd-regulator.c b/drivers/regulator/qcom_smd-regulator.c index b11b627..09c688d 100644 --- a/drivers/regulator/qcom_smd-regulator.c +++ b/drivers/regulator/qcom_smd-regulator.c @@ -246,7 +246,10 @@ static const struct regulator_desc pm8941_nldo = { }; static const struct regulator_desc pm8941_lnldo = { - .fixed_uV = 1740000, + .linear_ranges = (struct regulator_linear_range[]) { + REGULATOR_LINEAR_RANGE(1740000, 0, 0, 1740000), + }, + .n_linear_ranges = 1, .n_voltages = 1, .ops = &rpm_smps_ldo_ops, };