From: Axel Lin Date: Mon, 18 Jun 2012 02:11:28 +0000 (+0800) Subject: regulator: core: Support table based mapping in regulator_set_voltage_time_sel X-Git-Tag: v3.6-rc1~157^2^2~90 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=398715ab9414b3b7741c8239c254111f5016821c;p=pandora-kernel.git regulator: core: Support table based mapping in regulator_set_voltage_time_sel For table based mapping, we can calculate voltage difference by below equation: abs(rdev->desc->volt_table[new_selector] - rdev->desc->volt_table[old_selector]) Thus we can make regulator_set_voltage_time_sel work for table based mapping. regulator_set_voltage_time_sel() only supports linear or table based mapping. In case it is misused, also warn if neither linear nor table based mapping is used with regulator_set_voltage_time_sel(). Signed-off-by: Axel Lin Signed-off-by: Mark Brown --- Reading git-diff-tree failed