From patchwork Thu Jun 6 18:49:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeffrey Hugo X-Patchwork-Id: 166048 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp9154819ili; Thu, 6 Jun 2019 11:50:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqw+iddo5eYnBURJW9ygh3MwHgBK+ZKSBP+434h8UyFM+kEN5ISYG1SHI1GfJbmQkinIa5GJ X-Received: by 2002:a17:90a:d151:: with SMTP id t17mr1308771pjw.60.1559847050308; Thu, 06 Jun 2019 11:50:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559847050; cv=none; d=google.com; s=arc-20160816; b=IVaaDzhaqkN2COWzaPnI6tyBH+fB11Reu8aRCKrdghUzKgLevBXYcLmhISvWBdQu3T lGsZYpwPCT9TnYtt+TlKkFBR5vaWptv/ZAkmRoWVZHmEomYJYSJv6JuAvggzegs4i5HT z2NpZI+/hJek15uB/aNLPnfmIsGfPRPwAE0c9wqBqy73X5q0bXPThRpYkUhP++v2MlBG 7gy6fVF6XDPLSbnZU6NNZNB08UsnxRFWJiRYzCBepC/1r9UgiK65tzIKYqOa0f3Mpsah //uYRKZXQcqM/wXJuy/5Sn5zuu03KjgtcMFk83ofFgDBQON+26Ik0v8AU9ouWrNjPZCr +ZzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=BygsFeH7Nr66mPQvbX5gJcEmwzV3pSewGfseE3W/ZuQ=; b=DkzrTvR+crD7Htm9aY1jYQFNHye6lLRW0U2lX7yadjym4S9Tus6XBSmK586kNz4UaB yYPhMBcbSSOxCYBQyEsLCZwXTyZa6nLdgorwH9SwU9MaI71AwZ7I/MmYilawJKe7538p YOpKTXaPiqa7rCyWFflVKvkj7NhNx8S067+Mp2HTMpvJHJdc6bjI+SQQ49D/8opPZfrf Bp/cWkFxr6l8agl10gXoy+knNHTpIuKErgKtl/9h7Js5uK5BzxSEWKIiMZlJqqq4FJL0 ejeDtEaHwS2PvESffuD+4d8Qk1Um5RTKbLtoEIl37UwU9kqFQyUdGqgQaNr1IbMqDDJb Hamg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XoSInAof; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f20si2427512pfn.207.2019.06.06.11.50.49; Thu, 06 Jun 2019 11:50:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-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=@gmail.com header.s=20161025 header.b=XoSInAof; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728243AbfFFSut (ORCPT + 15 others); Thu, 6 Jun 2019 14:50:49 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:36392 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727238AbfFFSut (ORCPT ); Thu, 6 Jun 2019 14:50:49 -0400 Received: by mail-pg1-f193.google.com with SMTP id a3so1858370pgb.3; Thu, 06 Jun 2019 11:50:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BygsFeH7Nr66mPQvbX5gJcEmwzV3pSewGfseE3W/ZuQ=; b=XoSInAofZOL2wzQjfB3W8Oo7Vmt4OkVObNHIKYrGfG8euyno+tG13Lj7JMSzdjHOAq UkWvSt23pNZJLeTQyglKffCUXI43UjKYV9jYJNwA3Ra8Hhb7gDYnjlyZCxETgRWCOAqq wwW8KVkCWljkb7QTovPCGYxT91oPGcFaqkjgRUs8jGZok7OlCutz2NI6NP387Ra7wDkV Rh/cvjDzrfuWCUTIhamU0Zu3WXqnM+ICxv09KzcbUfX8iR71Xzk0RDwXYh0NEtDULrlS 4C17pyG9p+nnBwOUPOzPc6cHohxrqpiwGGvIgQojEL6fjbU8WaSmhWeZkbVHqx5Gk9l+ DDYA== 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; bh=BygsFeH7Nr66mPQvbX5gJcEmwzV3pSewGfseE3W/ZuQ=; b=lyzaTCHtxSf3fjoTA5vLc7Pk6yikMtFsUM+0eVK0R0V6DrYeSHX4qZ78eWAAY9nyk4 tT+Il/sf8Z4T1B8BzTanUxLIHZg5+eZDyId+J8WKWcRhzBGs4aZ0CsgyVPA3aZOj3+jA MEj2WTjsq7P+g4CaMX6XX+cHU/T1wltJJtmLpT6LeqWG8Jkzi/pbHwS4WftJCy+PU2Cz hWoSvJTlAfi9D03HwuSJk+2ufIOSnxPSWEHiqYAEsqmHRTUeB0cK8LzUbnddcduJdq0o wzYzPkqRXe9FDT/j3iPzLrHTEHCva64iAooXo9zM+M9dmRZWgVbryf6ZLBkuuqSqr7OC auhw== X-Gm-Message-State: APjAAAUScfoX9i2kpS8PmvsU4MHa8K/oVHEtOkY6tekJay8Q/nq/8STG FO9UQ2ky8GmX55ki+tdhEhg= X-Received: by 2002:a17:90a:bf84:: with SMTP id d4mr1270469pjs.124.1559847048594; Thu, 06 Jun 2019 11:50:48 -0700 (PDT) Received: from aw-bldr-10.qualcomm.com (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id y10sm2890609pfm.68.2019.06.06.11.50.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Jun 2019 11:50:48 -0700 (PDT) From: Jeffrey Hugo To: lgirdwood@gmail.com, broonie@kernel.org Cc: agross@kernel.org, david.brown@linaro.org, bjorn.andersson@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, jorge.ramirez-ortiz@linaro.org, niklas.cassel@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Jeffrey Hugo Subject: [PATCH v2 1/7] drivers: regulator: qcom_spmi: enable linear range info Date: Thu, 6 Jun 2019 11:49:23 -0700 Message-Id: <20190606184923.39537-1-jeffrey.l.hugo@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190606184842.39484-1-jeffrey.l.hugo@gmail.com> References: <20190606184842.39484-1-jeffrey.l.hugo@gmail.com> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Jorge Ramirez-Ortiz Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Jeffrey Hugo --- drivers/regulator/qcom_spmi-regulator.c | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.17.1 diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c index 53a61fb65642..fd55438c25d6 100644 --- a/drivers/regulator/qcom_spmi-regulator.c +++ b/drivers/regulator/qcom_spmi-regulator.c @@ -1744,6 +1744,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; @@ -1833,6 +1834,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;