Thread (46 messages) flat view 46 messages, 8 authors, 2016-03-16

Re: [PATCH v4 09/24] regulator: pwm: use pwm_get/set_default_xxx() helpers where appropriate

From: Mark Brown <broonie@kernel.org>
Date: 2015-11-16 10:57:25
Also in: linux-arm-kernel, linux-clk, linux-input, linux-leds, linux-pwm, linux-rockchip, lkml

On Mon, Nov 16, 2015 at 09:56:32AM +0100, Boris Brezillon wrote:
quoted hunk ↗ jump to hunk
+++ b/drivers/regulator/pwm-regulator.c
@@ -56,7 +56,7 @@ static int pwm_regulator_set_voltage_sel(struct regulator_dev *rdev,
 	int dutycycle;
 	int ret;
 
-	pwm_reg_period = pwm_get_period(drvdata->pwm);
+	pwm_reg_period = pwm_get_default_period(drvdata->pwm);
 
 	dutycycle = (pwm_reg_period *
 		    drvdata->duty_cycle_table[selector].dutycycle) / 100;
It's not clear to me that we're not looking for the current period here
or in the other use.  Won't configuring based on a period other than the
one that has been set give the wrong answer?

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help