public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <s.nawrocki@samsung•com>
To: krzk@kernel•org, vireshk@kernel•org
Cc: devicetree@vger•kernel.org, linux-samsung-soc@vger•kernel.org,
	linux-pm@vger•kernel.org, b.zolnierkie@samsung•com,
	linux-kernel@vger•kernel.org, robh+dt@kernel•org,
	kgene@kernel•org, Sylwester Nawrocki <s.nawrocki@samsung•com>,
	linux-arm-kernel@lists•infradead.org, m.szyprowski@samsung•com
Subject: [PATCH v4 1/6] opp: Handle target/min/max voltage in dev_pm_opp_adjust_voltage()
Date: Tue, 10 Sep 2019 14:36:13 +0200	[thread overview]
Message-ID: <20190910123618.27985-2-s.nawrocki@samsung.com> (raw)
In-Reply-To: <20190910123618.27985-1-s.nawrocki@samsung.com>

To be squashed with patch "PM / OPP: Support adjusting OPP voltages
at runtime".

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung•com>
---
Changes since v3:
 - new patch

 drivers/opp/core.c     | 10 ++++++++--
 include/linux/pm_opp.h |  3 ++-
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/opp/core.c b/drivers/opp/core.c
index 407a07f29b12..4ebe5a6c280b 100644
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
@@ -2057,14 +2057,18 @@ static int _opp_set_availability(struct device *dev, unsigned long freq,
  * dev_pm_opp_adjust_voltage() - helper to change the voltage of an OPP
  * @dev:		device for which we do this operation
  * @freq:		OPP frequency to adjust voltage of
- * @u_volt:		new OPP voltage
+ * @u_volt:		new OPP target voltage
+ * @u_volt_min:		new OPP min voltage
+ * @u_volt_max:		new OPP max voltage
  *
  * Return: -EINVAL for bad pointers, -ENOMEM if no memory available for the
  * copy operation, returns 0 if no modifcation was done OR modification was
  * successful.
  */
 int dev_pm_opp_adjust_voltage(struct device *dev, unsigned long freq,
-			      unsigned long u_volt)
+			      unsigned long u_volt, unsigned long u_volt_min,
+			      unsigned long u_volt_max)
+
 {
 	struct opp_table *opp_table;
 	struct dev_pm_opp *tmp_opp, *opp = ERR_PTR(-ENODEV);
@@ -2098,6 +2102,8 @@ int dev_pm_opp_adjust_voltage(struct device *dev, unsigned long freq,
 		goto adjust_unlock;

 	opp->supplies->u_volt = u_volt;
+	opp->supplies->u_volt_min = u_volt_min;
+	opp->supplies->u_volt_max = u_volt_max;

 	dev_pm_opp_get(opp);
 	mutex_unlock(&opp_table->lock);
diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h
index 86947d53e8c4..0ee1daafe6af 100644
--- a/include/linux/pm_opp.h
+++ b/include/linux/pm_opp.h
@@ -113,7 +113,8 @@ void dev_pm_opp_remove(struct device *dev, unsigned long freq);
 void dev_pm_opp_remove_all_dynamic(struct device *dev);

 int dev_pm_opp_adjust_voltage(struct device *dev, unsigned long freq,
-			      unsigned long u_volt);
+			      unsigned long u_volt, unsigned long u_volt_min,
+			      unsigned long u_volt_max);

 int dev_pm_opp_enable(struct device *dev, unsigned long freq);

--
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-09-10 12:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20190910123632eucas1p2cf941da5f74b892288dd5a92ff9fa9fb@eucas1p2.samsung.com>
2019-09-10 12:36 ` [PATCH v4 0/6] Exynos Adaptive Supply Voltage support Sylwester Nawrocki
2019-09-10 12:36   ` Sylwester Nawrocki [this message]
2019-10-02 14:33     ` [PATCH v4 1/6] opp: Handle target/min/max voltage in dev_pm_opp_adjust_voltage() Krzysztof Kozlowski
2019-10-02 15:54       ` Sylwester Nawrocki
2019-10-14  6:26         ` Viresh Kumar
2019-10-16  9:15           ` Sylwester Nawrocki
2019-09-10 12:36   ` [PATCH v4 2/6] dt-bindings: samsung: Update the CHIP ID binding documentation Sylwester Nawrocki
2019-09-17 18:13     ` Rob Herring
2019-10-02 15:48       ` Krzysztof Kozlowski
2019-10-02 16:00         ` Sylwester Nawrocki
2019-09-10 12:36   ` [PATCH v4 3/6] soc: samsung: Add Exynos Adaptive Supply Voltage driver Sylwester Nawrocki
2019-09-10 12:36   ` [PATCH v4 4/6] ARM: EXYNOS: Enable exynos-asv driver for ARCH_EXYNOS Sylwester Nawrocki
2019-09-10 12:36   ` [PATCH v4 5/6] ARM: dts: Add "syscon" compatible string to chipid node Sylwester Nawrocki
2019-10-02 15:44     ` Krzysztof Kozlowski
2019-09-10 12:36   ` [PATCH v4 6/6] ARM: dts: Add samsung,asv-bin property for odroidxu3-lite Sylwester Nawrocki
2019-10-02 15:44     ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190910123618.27985-2-s.nawrocki@samsung.com \
    --to=s.nawrocki@samsung$(echo .)com \
    --cc=b.zolnierkie@samsung$(echo .)com \
    --cc=devicetree@vger$(echo .)kernel.org \
    --cc=kgene@kernel$(echo .)org \
    --cc=krzk@kernel$(echo .)org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-pm@vger$(echo .)kernel.org \
    --cc=linux-samsung-soc@vger$(echo .)kernel.org \
    --cc=m.szyprowski@samsung$(echo .)com \
    --cc=robh+dt@kernel$(echo .)org \
    --cc=vireshk@kernel$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox