Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge remote-tracking branch 'regulator/topic/linar' into regulator-next

+16
+15
drivers/regulator/core.c
··· 2138 2138 EXPORT_SYMBOL_GPL(regulator_list_voltage); 2139 2139 2140 2140 /** 2141 + * regulator_get_linear_step - return the voltage step size between VSEL values 2142 + * @regulator: regulator source 2143 + * 2144 + * Returns the voltage step size between VSEL values for linear 2145 + * regulators, or return 0 if the regulator isn't a linear regulator. 2146 + */ 2147 + unsigned int regulator_get_linear_step(struct regulator *regulator) 2148 + { 2149 + struct regulator_dev *rdev = regulator->rdev; 2150 + 2151 + return rdev->desc->uV_step; 2152 + } 2153 + EXPORT_SYMBOL_GPL(regulator_get_linear_step); 2154 + 2155 + /** 2141 2156 * regulator_is_supported_voltage - check if a voltage range can be supported 2142 2157 * 2143 2158 * @regulator: Regulator to check.
+1
include/linux/regulator/consumer.h
··· 165 165 int regulator_list_voltage(struct regulator *regulator, unsigned selector); 166 166 int regulator_is_supported_voltage(struct regulator *regulator, 167 167 int min_uV, int max_uV); 168 + unsigned int regulator_get_linear_step(struct regulator *regulator); 168 169 int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV); 169 170 int regulator_set_voltage_time(struct regulator *regulator, 170 171 int old_uV, int new_uV);