Commit 0a192cc8 authored by Mark Brown's avatar Mark Brown

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

parents 39c9f80f 2a668a8b
...@@ -2137,6 +2137,21 @@ int regulator_list_voltage(struct regulator *regulator, unsigned selector) ...@@ -2137,6 +2137,21 @@ int regulator_list_voltage(struct regulator *regulator, unsigned selector)
} }
EXPORT_SYMBOL_GPL(regulator_list_voltage); EXPORT_SYMBOL_GPL(regulator_list_voltage);
/**
* regulator_get_linear_step - return the voltage step size between VSEL values
* @regulator: regulator source
*
* Returns the voltage step size between VSEL values for linear
* regulators, or return 0 if the regulator isn't a linear regulator.
*/
unsigned int regulator_get_linear_step(struct regulator *regulator)
{
struct regulator_dev *rdev = regulator->rdev;
return rdev->desc->uV_step;
}
EXPORT_SYMBOL_GPL(regulator_get_linear_step);
/** /**
* regulator_is_supported_voltage - check if a voltage range can be supported * regulator_is_supported_voltage - check if a voltage range can be supported
* *
......
...@@ -165,6 +165,7 @@ int regulator_count_voltages(struct regulator *regulator); ...@@ -165,6 +165,7 @@ int regulator_count_voltages(struct regulator *regulator);
int regulator_list_voltage(struct regulator *regulator, unsigned selector); int regulator_list_voltage(struct regulator *regulator, unsigned selector);
int regulator_is_supported_voltage(struct regulator *regulator, int regulator_is_supported_voltage(struct regulator *regulator,
int min_uV, int max_uV); int min_uV, int max_uV);
unsigned int regulator_get_linear_step(struct regulator *regulator);
int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV); int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV);
int regulator_set_voltage_time(struct regulator *regulator, int regulator_set_voltage_time(struct regulator *regulator,
int old_uV, int new_uV); int old_uV, int new_uV);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment