lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 27 Jan 2015 18:46:35 -0800
From:	Bjorn Andersson <bjorn.andersson@...ymobile.com>
To:	Liam Girdwood <lgirdwood@...il.com>,
	Mark Brown <broonie@...nel.org>,
	<patches@...nsource.wolfsonmicro.com>
CC:	<agross@...eaurora.org>, <linux-kernel@...r.kernel.org>,
	<linux-arm-msm@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>
Subject: [PATCH 5/9] regulator: wm8350: move to set_optimum_mode

Signed-off-by: Bjorn Andersson <bjorn.andersson@...ymobile.com>
---
 drivers/regulator/wm8350-regulator.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c
index 7ec7c39..f8bcaed 100644
--- a/drivers/regulator/wm8350-regulator.c
+++ b/drivers/regulator/wm8350-regulator.c
@@ -915,13 +915,13 @@ static unsigned int get_mode(int uA, const struct wm8350_dcdc_efficiency *eff)
 	return REGULATOR_MODE_NORMAL;
 }
 
-/* Query the regulator for it's most efficient mode @ uV,uA
+/* Configure the regulator for it's most efficient mode @ uV,uA
  * WM8350 regulator efficiency is pretty similar over
  * different input and output uV.
  */
-static unsigned int wm8350_dcdc_get_optimum_mode(struct regulator_dev *rdev,
-						 int input_uV, int output_uV,
-						 int output_uA)
+static int wm8350_dcdc_set_optimum_mode(struct regulator_dev *rdev,
+					int input_uV, int output_uV,
+					int output_uA)
 {
 	int dcdc = rdev_get_id(rdev), mode;
 
@@ -938,7 +938,7 @@ static unsigned int wm8350_dcdc_get_optimum_mode(struct regulator_dev *rdev,
 		mode = REGULATOR_MODE_NORMAL;
 		break;
 	}
-	return mode;
+	return wm8350_dcdc_set_mode(rdev, mode);
 }
 
 static struct regulator_ops wm8350_dcdc_ops = {
@@ -951,7 +951,7 @@ static struct regulator_ops wm8350_dcdc_ops = {
 	.is_enabled = regulator_is_enabled_regmap,
 	.get_mode = wm8350_dcdc_get_mode,
 	.set_mode = wm8350_dcdc_set_mode,
-	.get_optimum_mode = wm8350_dcdc_get_optimum_mode,
+	.set_optimum_mode = wm8350_dcdc_set_optimum_mode,
 	.set_suspend_voltage = wm8350_dcdc_set_suspend_voltage,
 	.set_suspend_enable = wm8350_dcdc_set_suspend_enable,
 	.set_suspend_disable = wm8350_dcdc_set_suspend_disable,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ