aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/regulator
diff options
context:
space:
mode:
authorMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com>2021-03-29 15:59:04 +0300
committerMark Brown <broonie@kernel.org>2021-04-02 18:33:59 +0100
commitfb8fee9efdcf084d9e31ba14cc4734d97e5dd972 (patch)
tree2e1aab252695ef4c345e7be30d3080e8d7cf941c /include/linux/regulator
parentregulator: helpers: Export helper voltage listing (diff)
downloadlinux-dev-fb8fee9efdcf084d9e31ba14cc4734d97e5dd972.tar.xz
linux-dev-fb8fee9efdcf084d9e31ba14cc4734d97e5dd972.zip
regulator: Add regmap helper for ramp-delay setting
Quite a few regulator ICs do support setting ramp-delay by writing a value matching the delay to a ramp-delay register. Provide a simple helper for table-based delay setting. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Link: https://lore.kernel.org/r/f101f1db564cf32cb58719c77af0b00d7236bb89.1617020713.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/regulator')
-rw-r--r--include/linux/regulator/driver.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index 39a540111645..597ed117086f 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -373,6 +373,10 @@ struct regulator_desc {
unsigned int pull_down_reg;
unsigned int pull_down_mask;
unsigned int pull_down_val_on;
+ unsigned int ramp_reg;
+ unsigned int ramp_mask;
+ const unsigned int *ramp_delay_table;
+ unsigned int n_ramp_values;
unsigned int enable_time;
@@ -535,6 +539,7 @@ int regulator_set_current_limit_regmap(struct regulator_dev *rdev,
int min_uA, int max_uA);
int regulator_get_current_limit_regmap(struct regulator_dev *rdev);
void *regulator_get_init_drvdata(struct regulator_init_data *reg_init_data);
+int regulator_set_ramp_delay_regmap(struct regulator_dev *rdev, int ramp_delay);
/*
* Helper functions intended to be used by regulator drivers prior registering