aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq806x/patches-4.14/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch
diff options
context:
space:
mode:
authorRam Chandra Jangir <rjangir@codeaurora.org>2018-05-04 21:57:33 +0530
committerJohn Crispin <john@phrozen.org>2018-05-22 20:34:14 +0200
commit93dd2f7211db6607184adadb488582e01fd5c29b (patch)
treefe982ceb4c20d2e1ecbe9ecfc386addaccae2e92 /target/linux/ipq806x/patches-4.14/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch
parent70e6ea319d3bfdfdb34be540dc7d89aa175b5587 (diff)
downloadupstream-93dd2f7211db6607184adadb488582e01fd5c29b.tar.gz
upstream-93dd2f7211db6607184adadb488582e01fd5c29b.tar.bz2
upstream-93dd2f7211db6607184adadb488582e01fd5c29b.zip
ipq806x: add kernel 4.14 support
- Rebased the patches for 4.14 - Dropped spi-qup and 0027, 0028, 0029 clk patches since it's already included in upstream. Tested on IPQ AP148 Board: 1) NOR boot and NAND boot 2) Tested USB and PCIe interfaces 3) WDOG test 4) cpu frequency scaling 5) ethernet, 2G and 5G WiFi 6) ubi sysupgrade Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org> Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Diffstat (limited to 'target/linux/ipq806x/patches-4.14/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch')
-rw-r--r--target/linux/ipq806x/patches-4.14/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/target/linux/ipq806x/patches-4.14/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch b/target/linux/ipq806x/patches-4.14/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch
new file mode 100644
index 0000000000..711e14c6cd
--- /dev/null
+++ b/target/linux/ipq806x/patches-4.14/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch
@@ -0,0 +1,38 @@
+From 4533c285c2aedce6d4434d7b877066de3b1ecb33 Mon Sep 17 00:00:00 2001
+From: Georgi Djakov <georgi.djakov@linaro.org>
+Date: Thu, 25 Aug 2016 18:43:35 +0300
+Subject: [PATCH 52/69] PM / OPP: Update the voltage tolerance when adjusting
+ the OPP
+
+When the voltage is adjusted, the voltage tolerance is not updated.
+This can lead to situations where the voltage min value is greater
+than the voltage max value. The final result is triggering a BUG()
+in the regulator core.
+Fix this by updating the voltage tolerance values too.
+
+Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
+---
+ drivers/base/power/opp/core.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/drivers/base/power/opp/core.c
++++ b/drivers/base/power/opp/core.c
+@@ -1649,6 +1649,7 @@ int dev_pm_opp_adjust_voltage(struct dev
+ struct opp_table *opp_table;
+ struct dev_pm_opp *new_opp, *tmp_opp, *opp = ERR_PTR(-ENODEV);
+ int r = 0;
++ unsigned long tol;
+
+ /* keep the node allocated */
+ new_opp = kmalloc(sizeof(*new_opp), GFP_KERNEL);
+@@ -1685,6 +1686,10 @@ int dev_pm_opp_adjust_voltage(struct dev
+
+ /* plug in new node */
+ new_opp->supplies[0].u_volt = u_volt;
++ tol = u_volt * opp_table->voltage_tolerance_v1 / 100;
++ new_opp->supplies[0].u_volt = u_volt;
++ new_opp->supplies[0].u_volt_min = u_volt - tol;
++ new_opp->supplies[0].u_volt_max = u_volt + tol;
+
+ list_replace(&opp->node, &new_opp->node);
+ mutex_unlock(&opp_table_lock);