* [PATCH] regulator: da9063: Add set_voltage_time_sel function
@ 2015-08-06 16:38 Philipp Zabel
2015-08-06 18:33 ` Mark Brown
0 siblings, 1 reply; 7+ messages in thread
From: Philipp Zabel @ 2015-08-06 16:38 UTC (permalink / raw)
To: linux-kernel
Cc: Liam Girdwood, Mark Brown, kernel, support.opensource, Philipp Zabel
This allows to set the regulator-ramp-delay in the device tree.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
drivers/regulator/da9063-regulator.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/regulator/da9063-regulator.c b/drivers/regulator/da9063-regulator.c
index aed1ad3..d870028 100644
--- a/drivers/regulator/da9063-regulator.c
+++ b/drivers/regulator/da9063-regulator.c
@@ -433,6 +433,7 @@ static struct regulator_ops da9063_buck_ops = {
.is_enabled = regulator_is_enabled_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
.set_voltage_sel = regulator_set_voltage_sel_regmap,
+ .set_voltage_time_sel = regulator_set_voltage_time_sel,
.list_voltage = regulator_list_voltage_linear,
.set_current_limit = da9063_set_current_limit,
.get_current_limit = da9063_get_current_limit,
@@ -451,6 +452,7 @@ static struct regulator_ops da9063_ldo_ops = {
.is_enabled = regulator_is_enabled_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
.set_voltage_sel = regulator_set_voltage_sel_regmap,
+ .set_voltage_time_sel = regulator_set_voltage_time_sel,
.list_voltage = regulator_list_voltage_linear,
.set_mode = da9063_ldo_set_mode,
.get_mode = da9063_ldo_get_mode,
--
2.4.6
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] regulator: da9063: Add set_voltage_time_sel function
2015-08-06 16:38 [PATCH] regulator: da9063: Add set_voltage_time_sel function Philipp Zabel
@ 2015-08-06 18:33 ` Mark Brown
2015-08-07 9:29 ` Philipp Zabel
0 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2015-08-06 18:33 UTC (permalink / raw)
To: Philipp Zabel; +Cc: linux-kernel, Liam Girdwood, kernel, support.opensource
[-- Attachment #1: Type: text/plain, Size: 825 bytes --]
On Thu, Aug 06, 2015 at 06:38:24PM +0200, Philipp Zabel wrote:
> This allows to set the regulator-ramp-delay in the device tree.
> @@ -433,6 +433,7 @@ static struct regulator_ops da9063_buck_ops = {
> .is_enabled = regulator_is_enabled_regmap,
> .get_voltage_sel = regulator_get_voltage_sel_regmap,
> .set_voltage_sel = regulator_set_voltage_sel_regmap,
> + .set_voltage_time_sel = regulator_set_voltage_time_sel,
> .list_voltage = regulator_list_voltage_linear,
> .set_current_limit = da9063_set_current_limit,
> .get_current_limit = da9063_get_current_limit,
This doesn't seem right - we shouldn't need to manually add this to
every device to get the generic property to work. Instead we ought to
just do this by default if there's nothing defined in the driver and we
see that a value was provided by DT.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] regulator: da9063: Add set_voltage_time_sel function
2015-08-06 18:33 ` Mark Brown
@ 2015-08-07 9:29 ` Philipp Zabel
2015-08-07 12:31 ` Mark Brown
0 siblings, 1 reply; 7+ messages in thread
From: Philipp Zabel @ 2015-08-07 9:29 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-kernel, Liam Girdwood, kernel, support.opensource
Am Donnerstag, den 06.08.2015, 19:33 +0100 schrieb Mark Brown:
> On Thu, Aug 06, 2015 at 06:38:24PM +0200, Philipp Zabel wrote:
> > This allows to set the regulator-ramp-delay in the device tree.
>
> > @@ -433,6 +433,7 @@ static struct regulator_ops da9063_buck_ops = {
> > .is_enabled = regulator_is_enabled_regmap,
> > .get_voltage_sel = regulator_get_voltage_sel_regmap,
> > .set_voltage_sel = regulator_set_voltage_sel_regmap,
> > + .set_voltage_time_sel = regulator_set_voltage_time_sel,
> > .list_voltage = regulator_list_voltage_linear,
> > .set_current_limit = da9063_set_current_limit,
> > .get_current_limit = da9063_get_current_limit,
>
> This doesn't seem right - we shouldn't need to manually add this to
> every device to get the generic property to work. Instead we ought to
> just do this by default if there's nothing defined in the driver and we
> see that a value was provided by DT.
Could there any side effects for regulators that currently don't set
set_voltage_time_sel at all? How about this:
----------8<----------
From: Philipp Zabel <p.zabel@pengutronix.de>
Subject: [PATCH] regulator: make regulator_set_voltage_time_sel default
Instead of having nearly all drivers set ops->set_voltage_time_sel to
the same implementation, just use it as the default implementation if
ops->set_voltage_time_sel is NULL and a ramp_delay is set in the
constraints.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Suggested-by: Mark Brown <broonie@kernel.org>
---
drivers/regulator/core.c | 26 +++++++++++++++++---------
drivers/regulator/fan53555.c | 1 -
drivers/regulator/ltc3589.c | 1 -
drivers/regulator/max77686.c | 4 ----
drivers/regulator/max77802.c | 5 -----
drivers/regulator/max8973-regulator.c | 1 -
drivers/regulator/mt6311-regulator.c | 1 -
drivers/regulator/mt6397-regulator.c | 2 --
drivers/regulator/palmas-regulator.c | 4 ----
drivers/regulator/pfuze100-regulator.c | 1 -
drivers/regulator/rc5t583-regulator.c | 1 -
drivers/regulator/s2mpa01.c | 1 -
drivers/regulator/s2mps11.c | 4 ----
drivers/regulator/tps51632-regulator.c | 1 -
drivers/regulator/tps62360-regulator.c | 1 -
drivers/regulator/tps65218-regulator.c | 1 -
drivers/regulator/tps65910-regulator.c | 1 -
include/linux/regulator/driver.h | 3 ---
18 files changed, 17 insertions(+), 42 deletions(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 6130346..7837884 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -110,6 +110,9 @@ static struct regulator *create_regulator(struct regulator_dev *rdev,
struct device *dev,
const char *supply_name);
static void _regulator_put(struct regulator *regulator);
+static int _regulator_set_voltage_time_sel(struct regulator_dev *rdev,
+ unsigned int old_selector,
+ unsigned int new_selector);
static const char *rdev_get_name(struct regulator_dev *rdev)
{
@@ -2621,7 +2624,8 @@ static int _regulator_do_set_voltage(struct regulator_dev *rdev,
* info to call set_voltage_time_sel().
*/
if (_regulator_is_enabled(rdev) &&
- rdev->desc->ops->set_voltage_time_sel &&
+ (rdev->desc->ops->set_voltage_time_sel ||
+ rdev->constraints->ramp_delay) &&
rdev->desc->ops->get_voltage_sel) {
old_selector = rdev->desc->ops->get_voltage_sel(rdev);
if (old_selector < 0)
@@ -2679,7 +2683,7 @@ static int _regulator_do_set_voltage(struct regulator_dev *rdev,
if (ret == 0 && !rdev->constraints->ramp_disable && old_selector >= 0
&& old_selector != selector) {
- delay = rdev->desc->ops->set_voltage_time_sel(rdev,
+ delay = _regulator_set_voltage_time_sel(rdev,
old_selector, selector);
if (delay < 0) {
rdev_warn(rdev, "set_voltage_time_sel() failed: %d\n",
@@ -2813,7 +2817,8 @@ int regulator_set_voltage_time(struct regulator *regulator,
int i;
/* Currently requires operations to do this */
- if (!ops->list_voltage || !ops->set_voltage_time_sel
+ if (!ops->list_voltage || (!ops->set_voltage_time_sel
+ && !rdev->constraints->ramp_delay)
|| !rdev->desc->n_voltages)
return -EINVAL;
@@ -2833,12 +2838,12 @@ int regulator_set_voltage_time(struct regulator *regulator,
if (old_sel < 0 || new_sel < 0)
return -EINVAL;
- return ops->set_voltage_time_sel(rdev, old_sel, new_sel);
+ return _regulator_set_voltage_time_sel(rdev, old_sel, new_sel);
}
EXPORT_SYMBOL_GPL(regulator_set_voltage_time);
/**
- * regulator_set_voltage_time_sel - get raise/fall time
+ * _regulator_set_voltage_time_sel - get raise/fall time
* @rdev: regulator source device
* @old_selector: selector for starting voltage
* @new_selector: selector for target voltage
@@ -2849,13 +2854,17 @@ EXPORT_SYMBOL_GPL(regulator_set_voltage_time);
* Drivers providing ramp_delay in regulation_constraints can use this as their
* set_voltage_time_sel() operation.
*/
-int regulator_set_voltage_time_sel(struct regulator_dev *rdev,
- unsigned int old_selector,
- unsigned int new_selector)
+static int _regulator_set_voltage_time_sel(struct regulator_dev *rdev,
+ unsigned int old_selector,
+ unsigned int new_selector)
{
unsigned int ramp_delay = 0;
int old_volt, new_volt;
+ if (rdev->desc->ops->set_voltage_time_sel)
+ return rdev->desc->ops->set_voltage_time_sel(rdev,
+ old_selector, new_selector);
+
if (rdev->constraints->ramp_delay)
ramp_delay = rdev->constraints->ramp_delay;
else if (rdev->desc->ramp_delay)
@@ -2875,7 +2884,6 @@ int regulator_set_voltage_time_sel(struct regulator_dev *rdev,
return DIV_ROUND_UP(abs(new_volt - old_volt), ramp_delay);
}
-EXPORT_SYMBOL_GPL(regulator_set_voltage_time_sel);
/**
* regulator_sync_voltage - re-apply last regulator output voltage
diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c
index 4940e82..1ac5af7 100644
--- a/drivers/regulator/fan53555.c
+++ b/drivers/regulator/fan53555.c
@@ -182,7 +182,6 @@ static int fan53555_set_ramp(struct regulator_dev *rdev, int ramp)
static struct regulator_ops fan53555_regulator_ops = {
.set_voltage_sel = regulator_set_voltage_sel_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
.map_voltage = regulator_map_voltage_linear,
.list_voltage = regulator_list_voltage_linear,
.set_suspend_voltage = fan53555_set_suspend_voltage,
diff --git a/drivers/regulator/ltc3589.c b/drivers/regulator/ltc3589.c
index f9adba0..d3c83ef 100644
--- a/drivers/regulator/ltc3589.c
+++ b/drivers/regulator/ltc3589.c
@@ -169,7 +169,6 @@ static struct regulator_ops ltc3589_linear_regulator_ops = {
.set_voltage_sel = regulator_set_voltage_sel_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
.set_ramp_delay = ltc3589_set_ramp_delay,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
.set_suspend_voltage = ltc3589_set_suspend_voltage,
.set_suspend_mode = ltc3589_set_suspend_mode,
};
diff --git a/drivers/regulator/max77686.c b/drivers/regulator/max77686.c
index 17ccf36..6b2c9f2 100644
--- a/drivers/regulator/max77686.c
+++ b/drivers/regulator/max77686.c
@@ -295,7 +295,6 @@ static struct regulator_ops max77686_ops = {
.disable = regulator_disable_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
.set_voltage_sel = regulator_set_voltage_sel_regmap,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
.set_suspend_mode = max77686_set_suspend_mode,
};
@@ -307,7 +306,6 @@ static struct regulator_ops max77686_ldo_ops = {
.disable = regulator_disable_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
.set_voltage_sel = regulator_set_voltage_sel_regmap,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
.set_suspend_mode = max77686_ldo_set_suspend_mode,
.set_suspend_disable = max77686_set_suspend_disable,
};
@@ -320,7 +318,6 @@ static struct regulator_ops max77686_buck1_ops = {
.disable = regulator_disable_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
.set_voltage_sel = regulator_set_voltage_sel_regmap,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
.set_suspend_disable = max77686_set_suspend_disable,
};
@@ -332,7 +329,6 @@ static struct regulator_ops max77686_buck_dvs_ops = {
.disable = regulator_disable_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
.set_voltage_sel = regulator_set_voltage_sel_regmap,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
.set_ramp_delay = max77686_set_ramp_delay,
.set_suspend_disable = max77686_set_suspend_disable,
};
diff --git a/drivers/regulator/max77802.c b/drivers/regulator/max77802.c
index c07ee13..7c98f1a 100644
--- a/drivers/regulator/max77802.c
+++ b/drivers/regulator/max77802.c
@@ -296,7 +296,6 @@ static struct regulator_ops max77802_ldo_ops_logic1 = {
.disable = regulator_disable_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
.set_voltage_sel = regulator_set_voltage_sel_regmap,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
.set_suspend_disable = max77802_set_suspend_disable,
.set_suspend_mode = max77802_set_suspend_mode,
};
@@ -312,7 +311,6 @@ static struct regulator_ops max77802_ldo_ops_logic2 = {
.disable = regulator_disable_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
.set_voltage_sel = regulator_set_voltage_sel_regmap,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
.set_mode = max77802_set_mode,
.get_mode = max77802_get_mode,
.set_suspend_mode = max77802_set_suspend_mode,
@@ -327,7 +325,6 @@ static struct regulator_ops max77802_buck_16_dvs_ops = {
.disable = regulator_disable_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
.set_voltage_sel = regulator_set_voltage_sel_regmap,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
.set_ramp_delay = max77802_set_ramp_delay_4bit,
.set_suspend_disable = max77802_set_suspend_disable,
};
@@ -341,7 +338,6 @@ static struct regulator_ops max77802_buck_234_ops = {
.disable = regulator_disable_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
.set_voltage_sel = regulator_set_voltage_sel_regmap,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
.set_ramp_delay = max77802_set_ramp_delay_2bit,
.set_suspend_disable = max77802_set_suspend_disable,
.set_suspend_mode = max77802_set_suspend_mode,
@@ -356,7 +352,6 @@ static struct regulator_ops max77802_buck_dvs_ops = {
.disable = regulator_disable_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
.set_voltage_sel = regulator_set_voltage_sel_regmap,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
.set_ramp_delay = max77802_set_ramp_delay_2bit,
.set_suspend_disable = max77802_set_suspend_disable,
};
diff --git a/drivers/regulator/max8973-regulator.c b/drivers/regulator/max8973-regulator.c
index 5b75b7c..9a16222 100644
--- a/drivers/regulator/max8973-regulator.c
+++ b/drivers/regulator/max8973-regulator.c
@@ -338,7 +338,6 @@ static const struct regulator_ops max8973_dcdc_ops = {
.list_voltage = regulator_list_voltage_linear,
.set_mode = max8973_dcdc_set_mode,
.get_mode = max8973_dcdc_get_mode,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
.set_ramp_delay = max8973_set_ramp_delay,
};
diff --git a/drivers/regulator/mt6311-regulator.c b/drivers/regulator/mt6311-regulator.c
index 2c2c85b..e5db434 100644
--- a/drivers/regulator/mt6311-regulator.c
+++ b/drivers/regulator/mt6311-regulator.c
@@ -46,7 +46,6 @@ static const struct regulator_ops mt6311_buck_ops = {
.map_voltage = regulator_map_voltage_linear_range,
.set_voltage_sel = regulator_set_voltage_sel_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
.enable = regulator_enable_regmap,
.disable = regulator_disable_regmap,
.is_enabled = regulator_is_enabled_regmap,
diff --git a/drivers/regulator/mt6397-regulator.c b/drivers/regulator/mt6397-regulator.c
index a5b2f47..ae057fd 100644
--- a/drivers/regulator/mt6397-regulator.c
+++ b/drivers/regulator/mt6397-regulator.c
@@ -165,7 +165,6 @@ static struct regulator_ops mt6397_volt_range_ops = {
.map_voltage = regulator_map_voltage_linear_range,
.set_voltage_sel = regulator_set_voltage_sel_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
.enable = regulator_enable_regmap,
.disable = regulator_disable_regmap,
.is_enabled = regulator_is_enabled_regmap,
@@ -177,7 +176,6 @@ static struct regulator_ops mt6397_volt_table_ops = {
.map_voltage = regulator_map_voltage_iterate,
.set_voltage_sel = regulator_set_voltage_sel_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
.enable = regulator_enable_regmap,
.disable = regulator_disable_regmap,
.is_enabled = regulator_is_enabled_regmap,
diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c
index 8217613..0f7a7fd 100644
--- a/drivers/regulator/palmas-regulator.c
+++ b/drivers/regulator/palmas-regulator.c
@@ -538,7 +538,6 @@ static struct regulator_ops palmas_ops_smps = {
.set_voltage_sel = regulator_set_voltage_sel_regmap,
.list_voltage = regulator_list_voltage_linear_range,
.map_voltage = regulator_map_voltage_linear_range,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
.set_ramp_delay = palmas_smps_set_ramp_delay,
};
@@ -549,7 +548,6 @@ static struct regulator_ops palmas_ops_ext_control_smps = {
.set_voltage_sel = regulator_set_voltage_sel_regmap,
.list_voltage = regulator_list_voltage_linear_range,
.map_voltage = regulator_map_voltage_linear_range,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
.set_ramp_delay = palmas_smps_set_ramp_delay,
};
@@ -575,7 +573,6 @@ static struct regulator_ops tps65917_ops_smps = {
.set_voltage_sel = regulator_set_voltage_sel_regmap,
.list_voltage = regulator_list_voltage_linear_range,
.map_voltage = regulator_map_voltage_linear_range,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
};
static struct regulator_ops tps65917_ops_ext_control_smps = {
@@ -636,7 +633,6 @@ static struct regulator_ops tps65917_ops_ldo = {
.set_voltage_sel = regulator_set_voltage_sel_regmap,
.list_voltage = regulator_list_voltage_linear,
.map_voltage = regulator_map_voltage_linear,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
};
static int palmas_regulator_config_external(struct palmas *palmas, int id,
diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c
index 2f66821..cf955e3 100644
--- a/drivers/regulator/pfuze100-regulator.c
+++ b/drivers/regulator/pfuze100-regulator.c
@@ -145,7 +145,6 @@ static struct regulator_ops pfuze100_sw_regulator_ops = {
.list_voltage = regulator_list_voltage_linear,
.set_voltage_sel = regulator_set_voltage_sel_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
.set_ramp_delay = pfuze100_set_ramp_delay,
};
diff --git a/drivers/regulator/rc5t583-regulator.c b/drivers/regulator/rc5t583-regulator.c
index d2e67c5..190f2f7 100644
--- a/drivers/regulator/rc5t583-regulator.c
+++ b/drivers/regulator/rc5t583-regulator.c
@@ -70,7 +70,6 @@ static struct regulator_ops rc5t583_ops = {
.set_voltage_sel = regulator_set_voltage_sel_regmap,
.list_voltage = regulator_list_voltage_linear,
.map_voltage = regulator_map_voltage_linear,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
};
#define RC5T583_REG(_id, _en_reg, _en_bit, _disc_reg, _disc_bit, \
diff --git a/drivers/regulator/s2mpa01.c b/drivers/regulator/s2mpa01.c
index 92f8875..3238d26 100644
--- a/drivers/regulator/s2mpa01.c
+++ b/drivers/regulator/s2mpa01.c
@@ -220,7 +220,6 @@ static struct regulator_ops s2mpa01_ldo_ops = {
.disable = regulator_disable_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
.set_voltage_sel = regulator_set_voltage_sel_regmap,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
};
static struct regulator_ops s2mpa01_buck_ops = {
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index 72fc3c3..cd42a8c 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -243,7 +243,6 @@ static struct regulator_ops s2mps11_ldo_ops = {
.disable = regulator_disable_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
.set_voltage_sel = regulator_set_voltage_sel_regmap,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
};
static struct regulator_ops s2mps11_buck_ops = {
@@ -587,7 +586,6 @@ static struct regulator_ops s2mps14_reg_ops = {
.disable = regulator_disable_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
.set_voltage_sel = regulator_set_voltage_sel_regmap,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
.set_suspend_disable = s2mps14_regulator_set_suspend_disable,
};
@@ -746,7 +744,6 @@ static struct regulator_ops s2mpu02_ldo_ops = {
.disable = regulator_disable_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
.set_voltage_sel = regulator_set_voltage_sel_regmap,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
.set_suspend_disable = s2mps14_regulator_set_suspend_disable,
};
@@ -758,7 +755,6 @@ static struct regulator_ops s2mpu02_buck_ops = {
.disable = regulator_disable_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
.set_voltage_sel = regulator_set_voltage_sel_regmap,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
.set_suspend_disable = s2mps14_regulator_set_suspend_disable,
.set_ramp_delay = s2mpu02_set_ramp_delay,
};
diff --git a/drivers/regulator/tps51632-regulator.c b/drivers/regulator/tps51632-regulator.c
index 572816e..73ff9a7 100644
--- a/drivers/regulator/tps51632-regulator.c
+++ b/drivers/regulator/tps51632-regulator.c
@@ -109,7 +109,6 @@ static struct regulator_ops tps51632_dcdc_ops = {
.get_voltage_sel = regulator_get_voltage_sel_regmap,
.set_voltage_sel = regulator_set_voltage_sel_regmap,
.list_voltage = regulator_list_voltage_linear,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
.set_ramp_delay = tps51632_dcdc_set_ramp_delay,
};
diff --git a/drivers/regulator/tps62360-regulator.c b/drivers/regulator/tps62360-regulator.c
index f6a6d36..5a80dc1 100644
--- a/drivers/regulator/tps62360-regulator.c
+++ b/drivers/regulator/tps62360-regulator.c
@@ -238,7 +238,6 @@ static struct regulator_ops tps62360_dcdc_ops = {
.set_voltage_sel = tps62360_dcdc_set_voltage_sel,
.list_voltage = regulator_list_voltage_linear,
.map_voltage = regulator_map_voltage_linear,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
.set_mode = tps62360_set_mode,
.get_mode = tps62360_get_mode,
};
diff --git a/drivers/regulator/tps65218-regulator.c b/drivers/regulator/tps65218-regulator.c
index 7f97223..7247f9b 100644
--- a/drivers/regulator/tps65218-regulator.c
+++ b/drivers/regulator/tps65218-regulator.c
@@ -161,7 +161,6 @@ static struct regulator_ops tps65218_dcdc12_ops = {
.set_voltage_sel = tps65218_pmic_set_voltage_sel,
.list_voltage = regulator_list_voltage_linear_range,
.map_voltage = regulator_map_voltage_linear_range,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
};
/* Operations permitted on DCDC3, DCDC4 and LDO1 */
diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c
index fb991ec..42e5c6aa 100644
--- a/drivers/regulator/tps65910-regulator.c
+++ b/drivers/regulator/tps65910-regulator.c
@@ -770,7 +770,6 @@ static struct regulator_ops tps65910_ops_dcdc = {
.get_mode = tps65910_get_mode,
.get_voltage_sel = tps65910_get_voltage_dcdc_sel,
.set_voltage_sel = tps65910_set_voltage_dcdc_sel,
- .set_voltage_time_sel = regulator_set_voltage_time_sel,
.list_voltage = tps65910_list_voltage_dcdc,
.map_voltage = regulator_map_voltage_ascend,
};
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index 4593222..2470604 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -437,9 +437,6 @@ int regulator_set_voltage_sel_regmap(struct regulator_dev *rdev, unsigned sel);
int regulator_is_enabled_regmap(struct regulator_dev *rdev);
int regulator_enable_regmap(struct regulator_dev *rdev);
int regulator_disable_regmap(struct regulator_dev *rdev);
-int regulator_set_voltage_time_sel(struct regulator_dev *rdev,
- unsigned int old_selector,
- unsigned int new_selector);
int regulator_set_bypass_regmap(struct regulator_dev *rdev, bool enable);
int regulator_get_bypass_regmap(struct regulator_dev *rdev, bool *enable);
--
2.4.6
---------->8----------
regards
Philipp
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] regulator: da9063: Add set_voltage_time_sel function
2015-08-07 9:29 ` Philipp Zabel
@ 2015-08-07 12:31 ` Mark Brown
2015-08-07 13:21 ` Philipp Zabel
0 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2015-08-07 12:31 UTC (permalink / raw)
To: Philipp Zabel; +Cc: linux-kernel, Liam Girdwood, kernel, support.opensource
[-- Attachment #1: Type: text/plain, Size: 359 bytes --]
On Fri, Aug 07, 2015 at 11:29:23AM +0200, Philipp Zabel wrote:
> Could there any side effects for regulators that currently don't set
> set_voltage_time_sel at all? How about this:
That looks reasonable, I can't see why there would be any issue? Please
submit this as a normal patch (or ideally split out the updates to the
drivers into separate patches).
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] regulator: da9063: Add set_voltage_time_sel function
2015-08-07 12:31 ` Mark Brown
@ 2015-08-07 13:21 ` Philipp Zabel
2015-08-07 13:29 ` Mark Brown
0 siblings, 1 reply; 7+ messages in thread
From: Philipp Zabel @ 2015-08-07 13:21 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-kernel, Liam Girdwood, kernel, support.opensource
Am Freitag, den 07.08.2015, 13:31 +0100 schrieb Mark Brown:
> On Fri, Aug 07, 2015 at 11:29:23AM +0200, Philipp Zabel wrote:
>
> > Could there any side effects for regulators that currently don't set
> > set_voltage_time_sel at all? How about this:
>
> That looks reasonable, I can't see why there would be any issue? Please
> submit this as a normal patch
Thanks, I'll do that then.
> (or ideally split out the updates to the
> drivers into separate patches).
When splitting the patch, the series either won't be bisectable (core
patch first) or temporarily remove functionality (driver patches first).
What do you suggest?
regards
Philipp
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] regulator: da9063: Add set_voltage_time_sel function
2015-08-07 13:21 ` Philipp Zabel
@ 2015-08-07 13:29 ` Mark Brown
2015-08-07 13:36 ` Philipp Zabel
0 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2015-08-07 13:29 UTC (permalink / raw)
To: Philipp Zabel; +Cc: linux-kernel, Liam Girdwood, kernel, support.opensource
[-- Attachment #1: Type: text/plain, Size: 592 bytes --]
On Fri, Aug 07, 2015 at 03:21:36PM +0200, Philipp Zabel wrote:
> Am Freitag, den 07.08.2015, 13:31 +0100 schrieb Mark Brown:
> > (or ideally split out the updates to the
> > drivers into separate patches).
> When splitting the patch, the series either won't be bisectable (core
> patch first) or temporarily remove functionality (driver patches first).
> What do you suggest?
I'd expect to see the core patch first - why would it break bisection?
Having the generic operation explicitly specified should still work just
as well as if the device specifies the generic function explicitly.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] regulator: da9063: Add set_voltage_time_sel function
2015-08-07 13:29 ` Mark Brown
@ 2015-08-07 13:36 ` Philipp Zabel
0 siblings, 0 replies; 7+ messages in thread
From: Philipp Zabel @ 2015-08-07 13:36 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-kernel, Liam Girdwood, kernel, support.opensource
Am Freitag, den 07.08.2015, 14:29 +0100 schrieb Mark Brown:
> On Fri, Aug 07, 2015 at 03:21:36PM +0200, Philipp Zabel wrote:
> > Am Freitag, den 07.08.2015, 13:31 +0100 schrieb Mark Brown:
>
> > > (or ideally split out the updates to the
> > > drivers into separate patches).
>
> > When splitting the patch, the series either won't be bisectable (core
> > patch first) or temporarily remove functionality (driver patches first).
> > What do you suggest?
>
> I'd expect to see the core patch first - why would it break bisection?
> Having the generic operation explicitly specified should still work just
> as well as if the device specifies the generic function explicitly.
I had unexported regmap_set_voltage_time_sel. I'll drop that part and
split it up as you prefer.
regards
Philipp
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-08-07 13:36 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-06 16:38 [PATCH] regulator: da9063: Add set_voltage_time_sel function Philipp Zabel
2015-08-06 18:33 ` Mark Brown
2015-08-07 9:29 ` Philipp Zabel
2015-08-07 12:31 ` Mark Brown
2015-08-07 13:21 ` Philipp Zabel
2015-08-07 13:29 ` Mark Brown
2015-08-07 13:36 ` Philipp Zabel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®