Skip to content

Commit 80a22fd

Browse files
Uwe Kleine-Königthierryreding
authored andcommitted
pwm: Document that the pinstate of a disabled PWM isn't reliable
Some (most?) drivers emit the inactive state when the PWM is disabled. However there are exceptions, so document that a consumer better doesn't depend on this behaviour. Some known exceptions: - imx27 emits 0 independent of the configured polarity - mxs just drives the output to the last emitted state. - iqs620a makes the output tristated on disable, so an external pull-down would be required. Signed-off-by: Uwe Kleine-König <[email protected]> Acked-by: Alexander Stein <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent a1bbf82 commit 80a22fd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Documentation/driver-api/pwm.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ After being requested, a PWM has to be configured using::
4949

5050
This API controls both the PWM period/duty_cycle config and the
5151
enable/disable state.
52+
53+
As a consumer, don't rely on the output's state for a disabled PWM. If it's
54+
easily possible, drivers are supposed to emit the inactive state, but some
55+
drivers cannot. If you rely on getting the inactive state, use .duty_cycle=0,
56+
.enabled=true.
57+
5258
There is also a usage_power setting: If set, the PWM driver is only required to
5359
maintain the power output but has more freedom regarding signal form.
5460
If supported by the driver, the signal can be optimized, for example to improve

0 commit comments

Comments
 (0)