diff options
author | Boris Brezillon <boris.brezillon@free-electrons.com> | 2016-04-14 15:17:21 -0400 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2016-05-03 07:44:37 -0400 |
commit | e39c0df1be5a97e0910b09af1530bdf3de057a06 (patch) | |
tree | 3299bb34c94cd6b989ecd54ff7cfcc9cc962d9ff /drivers/pwm/pwm-pxa.c | |
parent | f55532a0c0b8bb6148f4e07853b876ef73bc69ca (diff) |
pwm: Introduce the pwm_args concept
Currently the PWM core mixes the current PWM state with the per-platform
reference config (specified through the PWM lookup table, DT definition
or directly hardcoded in PWM drivers).
Create a struct pwm_args to store this reference configuration, so that
PWM users can differentiate between the current and reference
configurations.
Patch all places where pwm->args should be initialized. We keep the
pwm_set_polarity/period() calls until all PWM users are patched to use
pwm_args instead of pwm_get_period/polarity().
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
[thierry.reding@gmail.com: reword kerneldoc comments]
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm/pwm-pxa.c')
-rw-r--r-- | drivers/pwm/pwm-pxa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-pxa.c b/drivers/pwm/pwm-pxa.c index cb2f7024cf68..58b709f29130 100644 --- a/drivers/pwm/pwm-pxa.c +++ b/drivers/pwm/pwm-pxa.c | |||
@@ -160,7 +160,7 @@ pxa_pwm_of_xlate(struct pwm_chip *pc, const struct of_phandle_args *args) | |||
160 | if (IS_ERR(pwm)) | 160 | if (IS_ERR(pwm)) |
161 | return pwm; | 161 | return pwm; |
162 | 162 | ||
163 | pwm_set_period(pwm, args->args[0]); | 163 | pwm->args.period = args->args[0]; |
164 | 164 | ||
165 | return pwm; | 165 | return pwm; |
166 | } | 166 | } |