From fcf371ee5624cc87abac205cd0dad2432d7f0346 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Thu, 18 Apr 2013 10:34:49 +0800 Subject: regulator: core: Add regulator_map_voltage_ascend() API A lot of regulator hardware has ascendant voltage list. This patch adds regulator_map_voltage_ascend() and export it. Drivers that have ascendant voltage list can use this as their map_voltage() operation, this is more efficient than default regulator_map_voltage_iterate() function. Signed-off-by: Axel Lin Signed-off-by: Mark Brown --- include/linux/regulator/driver.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux/regulator') diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 7df93f52db08..2acdc66f8342 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h @@ -329,6 +329,8 @@ int regulator_map_voltage_linear(struct regulator_dev *rdev, int min_uV, int max_uV); int regulator_map_voltage_iterate(struct regulator_dev *rdev, int min_uV, int max_uV); +int regulator_map_voltage_ascend(struct regulator_dev *rdev, + int min_uV, int max_uV); int regulator_get_voltage_sel_regmap(struct regulator_dev *rdev); int regulator_set_voltage_sel_regmap(struct regulator_dev *rdev, unsigned sel); int regulator_is_enabled_regmap(struct regulator_dev *rdev); -- cgit v1.2.3