From patchwork Thu Apr 4 05:09:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Cassel X-Patchwork-Id: 10884923 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7B26217E0 for ; Thu, 4 Apr 2019 05:09:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5EACE28505 for ; Thu, 4 Apr 2019 05:09:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5243428628; Thu, 4 Apr 2019 05:09:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 044CA28505 for ; Thu, 4 Apr 2019 05:09:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726530AbfDDFJs (ORCPT ); Thu, 4 Apr 2019 01:09:48 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:33103 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725914AbfDDFJr (ORCPT ); Thu, 4 Apr 2019 01:09:47 -0400 Received: by mail-pf1-f194.google.com with SMTP id i19so745628pfd.0 for ; Wed, 03 Apr 2019 22:09:47 -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 :mime-version:content-transfer-encoding; bh=vQdCIQWz2/OSkRD/KWHO1VP+gkavuY4twT+b1yBYoCM=; b=A8KoeW3LQ8IeBLIEjTe8gdpRfup7E9tSobKG3ChSpGgnRBLLI5S+oASEFkZJ/OnO/C +YqVgGk3jFkYaub4hwjTph4fLbE58mc+ewR0ghD19ZGrWHBPmQMFLJQEmaVSirgnQmSi Daf4++Fy0ofkTw0yTeu1/t+YonjdUc++ptCaWDXfn5hcldU489IJOlP6PobXPjVT+0xq ZkS0lbXx+8YDEYrVbpFLcvjvKkdE90MWz96O6DB+ts4aSfuotARcwZj8BgADd29q553o +C9PP65zBS+OEox1on2LaJDtRBXq3RUpT9mCNsW7R4VeeDrUNrI0UsNdri43GKbkkwqT Blag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vQdCIQWz2/OSkRD/KWHO1VP+gkavuY4twT+b1yBYoCM=; b=dbLD5PeKUtvMJZxTaUsBPSSLU6dFwQj3oOt3dfR7rd9VQENBWYBELP7En6WCTIkyCD cn+E63NTUTF17L7aVTIao2lUs/Gzy0H6IIMi4fTiRfrC/bbjoeYZNricsp/UnwhxMiuY w7inM1c2jaQ5hvMuIzx8eeo64lH177BTfXDFO+iZQofPn43ImT3FhI64n1XXcSe3txEm 1D/Ah24vw1J6dehsjY/ARcKU0sDL2vnCvKs0HQuvfSDwYjvgDca44XaEV5PDwpwzNDTq +kRxiYVH0WvvD7LFiC+Xy/VsFZ2LmEzj90qHNOUZ/teccu1y2nf9jS8/ZQddMO9XIsnU PxSg== X-Gm-Message-State: APjAAAWTzY28grua1ExWDaTfZm3ndyz3IjQz0MoQCCIhL09/5xe02mVm vrTtox3RMmAVjxjeGkNjK26tuA== X-Google-Smtp-Source: APXvYqwbWvfS2aBlcMdxnTCzBmhLTdLeiyB70yBFkM/2Lyd7wwzZjCvNwQPvU/6DQQHnYfL+v+nDnQ== X-Received: by 2002:a63:4750:: with SMTP id w16mr3765472pgk.256.1554354586830; Wed, 03 Apr 2019 22:09:46 -0700 (PDT) Received: from centauri.imgcgcw.net ([147.50.13.10]) by smtp.gmail.com with ESMTPSA id a129sm50589089pfa.152.2019.04.03.22.09.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 03 Apr 2019 22:09:46 -0700 (PDT) From: Niklas Cassel To: Andy Gross , David Brown , Liam Girdwood , Mark Brown Cc: linux-arm-msm@vger.kernel.org, jorge.ramirez-ortiz@linaro.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 1/9] drivers: regulator: qcom_spmi: enable linear range info Date: Thu, 4 Apr 2019 07:09:22 +0200 Message-Id: <20190404050931.9812-2-niklas.cassel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190404050931.9812-1-niklas.cassel@linaro.org> References: <20190404050931.9812-1-niklas.cassel@linaro.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jorge Ramirez-Ortiz Signed-off-by: Jorge Ramirez-Ortiz --- drivers/regulator/qcom_spmi-regulator.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c index 3193506eac6f..f2edf510b0df 100644 --- a/drivers/regulator/qcom_spmi-regulator.c +++ b/drivers/regulator/qcom_spmi-regulator.c @@ -1907,6 +1907,7 @@ MODULE_DEVICE_TABLE(of, qcom_spmi_regulator_match); static int qcom_spmi_regulator_probe(struct platform_device *pdev) { const struct spmi_regulator_data *reg; + const struct spmi_voltage_range *range; const struct of_device_id *match; struct regulator_config config = { }; struct regulator_dev *rdev; @@ -1996,6 +1997,12 @@ static int qcom_spmi_regulator_probe(struct platform_device *pdev) } } + if (vreg->logical_type == SPMI_REGULATOR_LOGICAL_TYPE_HFS430) { + /* since there is only one range */ + range = spmi_regulator_find_range(vreg); + vreg->desc.uV_step = range->step_uV; + } + config.dev = dev; config.driver_data = vreg; config.regmap = regmap;