diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2021-07-01 09:29:26 +0200 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2021-11-17 17:09:22 +0100 |
commit | 92f69e582e15bf281ff1ab3ccc7abdd8392550a3 (patch) | |
tree | 763625b54e2b8fe4dde2269972c9754d19e7bfac /tools/perf | |
parent | 77965c98cffe41994dce3389c4aae80e2072f098 (diff) | |
download | linux-92f69e582e15bf281ff1ab3ccc7abdd8392550a3.tar.bz2 |
pwm: Prevent a glitch for legacy drivers
If a running PWM is reconfigured to disabled calling the ->config()
callback before disabling the hardware might result in a glitch where
the (maybe) new period and duty_cycle are visible on the output before
disabling the hardware.
So handle disabling before calling ->config(). Also exit early in this case
which is possible because period and duty_cycle don't matter for disabled PWMs.
In return however ->config has to be called even if state->period ==
pwm->state.period && state->duty_cycle != pwm->state.duty_cycle because setting
these might have been skipped in the previous call.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'tools/perf')
0 files changed, 0 insertions, 0 deletions