diff options
| author | Uwe Kleine-König <[email protected]> | 2021-05-10 14:06:37 +0000 |
|---|---|---|
| committer | Thierry Reding <[email protected]> | 2021-05-25 16:13:51 +0000 |
| commit | cf38c978cf1d2a28deaf34842aef692a959fa9e6 (patch) | |
| tree | f46554112d65e06c7c04c6932e0aa087dbe8d6af /drivers/pwm/pwm-stm32.c | |
| parent | Linux 5.13-rc1 (diff) | |
| download | kernel-cf38c978cf1d2a28deaf34842aef692a959fa9e6.tar.gz kernel-cf38c978cf1d2a28deaf34842aef692a959fa9e6.zip | |
pwm: Make of_pwm_xlate_with_flags() work with #pwm-cells = <2>
The two functions of_pwm_simple_xlate() and of_pwm_xlate_with_flags()
are quite similar. of_pwm_simple_xlate() only supports two-cell PWM
specifiers while of_pwm_xlate_with_flags() only supports PWM specifiers
with 3 or more cells. The latter can easily be modified to behave
identically to of_pwm_simple_xlate() for two-cell PWM specifiers. This
is implemented here and allows to drop of_pwm_simple_xlate() in the next
commit.
There is a small detail that is different now in the two-cell specifier
case in of_pwm_xlate_with_flags(): pwm->args.polarity is unconditionally
initialized to PWM_POLARITY_NORMAL in the latter. I didn't find a case
where this matters and doing that explicitly is the more robust
approach.
Signed-off-by: Uwe Kleine-König <[email protected]>
[[email protected]: fix up checkpatch warnings]
Signed-off-by: Thierry Reding <[email protected]>
Diffstat (limited to 'drivers/pwm/pwm-stm32.c')
0 files changed, 0 insertions, 0 deletions
