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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed,  3 Jul 2013 10:16:32 +0100
From:	Mark Brown <broonie@...nel.org>
To:	Liam Girdwood <lgirdwood@...il.com>,
	Lee Jones <lee.jones@...aro.org>,
	Bengt Jonsson <bengt.g.jonsson@...ricsson.com>
Cc:	linux-kernel@...r.kernel.org, linaro-kernel@...ts.linaro.org,
	Mark Brown <broonie@...aro.org>
Subject: [PATCH] regulator: ab8500: Provide map_voltage() functions

From: Mark Brown <broonie@...aro.org>

Since all the voltage tables for ab8500 are sorted in ascending order we
can improve performance by using regulator_map_voltage_ascend(). A couple
of the regulators can actually use linear maps which would be even better.

Signed-off-by: Mark Brown <broonie@...aro.org>
---
 drivers/regulator/ab8500.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index 603f192..43cb354 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -651,6 +651,7 @@ static struct regulator_ops ab8500_regulator_volt_mode_ops = {
 	.get_voltage_sel 	= ab8500_regulator_get_voltage_sel,
 	.set_voltage_sel	= ab8500_regulator_set_voltage_sel,
 	.list_voltage		= regulator_list_voltage_table,
+	.map_voltage		= regulator_map_voltage_ascend,
 };
 
 static struct regulator_ops ab8540_aux3_regulator_volt_mode_ops = {
@@ -663,6 +664,7 @@ static struct regulator_ops ab8540_aux3_regulator_volt_mode_ops = {
 	.get_voltage_sel = ab8540_aux3_regulator_get_voltage_sel,
 	.set_voltage_sel = ab8540_aux3_regulator_set_voltage_sel,
 	.list_voltage	= regulator_list_voltage_table,
+	.map_voltage	= regulator_map_voltage_ascend,
 };
 
 static struct regulator_ops ab8500_regulator_volt_ops = {
@@ -672,6 +674,7 @@ static struct regulator_ops ab8500_regulator_volt_ops = {
 	.get_voltage_sel = ab8500_regulator_get_voltage_sel,
 	.set_voltage_sel = ab8500_regulator_set_voltage_sel,
 	.list_voltage	= regulator_list_voltage_table,
+	.map_voltage	= regulator_map_voltage_ascend,
 };
 
 static struct regulator_ops ab8500_regulator_mode_ops = {
@@ -682,6 +685,7 @@ static struct regulator_ops ab8500_regulator_mode_ops = {
 	.set_mode		= ab8500_regulator_set_mode,
 	.get_mode		= ab8500_regulator_get_mode,
 	.list_voltage		= regulator_list_voltage_table,
+	.map_voltage	= regulator_map_voltage_ascend,
 };
 
 static struct regulator_ops ab8500_regulator_ops = {
@@ -689,6 +693,7 @@ static struct regulator_ops ab8500_regulator_ops = {
 	.disable		= ab8500_regulator_disable,
 	.is_enabled		= ab8500_regulator_is_enabled,
 	.list_voltage		= regulator_list_voltage_table,
+	.map_voltage		= regulator_map_voltage_ascend,
 };
 
 static struct regulator_ops ab8500_regulator_anamic_mode_ops = {
@@ -698,6 +703,7 @@ static struct regulator_ops ab8500_regulator_anamic_mode_ops = {
 	.set_mode	= ab8500_regulator_set_mode,
 	.get_mode	= ab8500_regulator_get_mode,
 	.list_voltage	= regulator_list_voltage_table,
+	.map_voltage	= regulator_map_voltage_ascend,
 };
 
 /* AB8500 regulator information */
-- 
1.8.3.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