summaryrefslogtreecommitdiffstats
path: root/Documentation/driver-api
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2022-05-17 17:05:55 +0200
committerThierry Reding <thierry.reding@gmail.com>2022-05-20 16:36:07 +0200
commit80a22fde803af6f390be49ee5ced6ee75595ba05 (patch)
treef3e43e450f04d9876b4eea558aa547f334096c8c /Documentation/driver-api
parenta1bbf823e5e9178ec2f70dd52345fd1a57efe145 (diff)
downloadlinux-80a22fde803af6f390be49ee5ced6ee75595ba05.tar.gz
linux-80a22fde803af6f390be49ee5ced6ee75595ba05.tar.bz2
linux-80a22fde803af6f390be49ee5ced6ee75595ba05.zip
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 <u.kleine-koenig@pengutronix.de> Acked-by: Alexander Stein <alexander.stein@ew.tq-group.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'Documentation/driver-api')
-rw-r--r--Documentation/driver-api/pwm.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/Documentation/driver-api/pwm.rst b/Documentation/driver-api/pwm.rst
index ccb06e485756..fd26c3d895b6 100644
--- a/Documentation/driver-api/pwm.rst
+++ b/Documentation/driver-api/pwm.rst
@@ -49,6 +49,12 @@ After being requested, a PWM has to be configured using::
This API controls both the PWM period/duty_cycle config and the
enable/disable state.
+
+As a consumer, don't rely on the output's state for a disabled PWM. If it's
+easily possible, drivers are supposed to emit the inactive state, but some
+drivers cannot. If you rely on getting the inactive state, use .duty_cycle=0,
+.enabled=true.
+
There is also a usage_power setting: If set, the PWM driver is only required to
maintain the power output but has more freedom regarding signal form.
If supported by the driver, the signal can be optimized, for example to improve