]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/regulator/core.c
Merge remote-tracking branch 'regulator/topic/linar' into regulator-next
[karo-tx-linux.git] / drivers / regulator / core.c
index 815d6df8bd5f70fab479247c81c6afe7fa746841..288c75abc19034c06e62772ea6b6cc62242da473 100644 (file)
@@ -2137,6 +2137,21 @@ int regulator_list_voltage(struct regulator *regulator, unsigned selector)
 }
 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
  *