aboutsummaryrefslogtreecommitdiff
path: root/drivers/regulator/pwm-regulator.c
diff options
context:
space:
mode:
authorSean Young <[email protected]>2023-12-19 16:30:24 +0000
committerThierry Reding <[email protected]>2023-12-20 16:07:04 +0100
commitc748a6d77c06a78651030e17da6beb278a1c9470 (patch)
treee858d2200f87189a80b0aeeeb68d96a449b63a11 /drivers/regulator/pwm-regulator.c
parent80943bbdcfa8138eca3bfd71a8ed4bdf1e107f6b (diff)
pwm: Rename pwm_apply_state() to pwm_apply_might_sleep()
In order to introduce a pwm api which can be used from atomic context, we will need two functions for applying pwm changes: int pwm_apply_might_sleep(struct pwm *, struct pwm_state *); int pwm_apply_atomic(struct pwm *, struct pwm_state *); This commit just deals with renaming pwm_apply_state(), a following commit will introduce the pwm_apply_atomic() function. Acked-by: Uwe Kleine-König <[email protected]> Acked-by: Guenter Roeck <[email protected]> Acked-by: Mark Brown <[email protected]> Acked-by: Dmitry Torokhov <[email protected]> # for input Acked-by: Hans de Goede <[email protected]> Acked-by: Jani Nikula <[email protected]> Acked-by: Lee Jones <[email protected]> Signed-off-by: Sean Young <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
Diffstat (limited to 'drivers/regulator/pwm-regulator.c')
-rw-r--r--drivers/regulator/pwm-regulator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/regulator/pwm-regulator.c b/drivers/regulator/pwm-regulator.c
index 2aff6db748e2..698c420e0869 100644
--- a/drivers/regulator/pwm-regulator.c
+++ b/drivers/regulator/pwm-regulator.c
@@ -90,7 +90,7 @@ static int pwm_regulator_set_voltage_sel(struct regulator_dev *rdev,
pwm_set_relative_duty_cycle(&pstate,
drvdata->duty_cycle_table[selector].dutycycle, 100);
- ret = pwm_apply_state(drvdata->pwm, &pstate);
+ ret = pwm_apply_might_sleep(drvdata->pwm, &pstate);
if (ret) {
dev_err(&rdev->dev, "Failed to configure PWM: %d\n", ret);
return ret;
@@ -216,7 +216,7 @@ static int pwm_regulator_set_voltage(struct regulator_dev *rdev,
pwm_set_relative_duty_cycle(&pstate, dutycycle, duty_unit);
- ret = pwm_apply_state(drvdata->pwm, &pstate);
+ ret = pwm_apply_might_sleep(drvdata->pwm, &pstate);
if (ret) {
dev_err(&rdev->dev, "Failed to configure PWM: %d\n", ret);
return ret;