diff mbox series

pwm: Clarify documentation about pwm_get_state()

Message ID 20210422071212.1647352-1-u.kleine-koenig@pengutronix.de
State Not Applicable
Headers show
Series pwm: Clarify documentation about pwm_get_state() | expand

Commit Message

Uwe Kleine-König April 22, 2021, 7:12 a.m. UTC
There is a difference between the last requested state and the last
implemented state. Clearify that pwm_get_state() returns the former.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 Documentation/driver-api/pwm.rst | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Uwe Kleine-König April 23, 2021, 7:29 a.m. UTC | #1
On Thu, Apr 22, 2021 at 09:12:12AM +0200, Uwe Kleine-König wrote:
> There is a difference between the last requested state and the last
> implemented state. Clearify that pwm_get_state() returns the former.

This patch is obsolete. This used to be a part of my patch "pwm: Rename
pwm_get_state() to better reflect its semantic"
(https://lore.kernel.org/r/20210406073036.26857-1-u.kleine-koenig@pengutronix.de)
and Thierry already picked the Documentation part.

Best regards
Uwe
diff mbox series

Patch

diff --git a/Documentation/driver-api/pwm.rst b/Documentation/driver-api/pwm.rst
index ab62f1bb0366..a7ca4f58305a 100644
--- a/Documentation/driver-api/pwm.rst
+++ b/Documentation/driver-api/pwm.rst
@@ -55,7 +55,11 @@  several parameter at once. For example, if you see pwm_config() and
 pwm_{enable,disable}() calls in the same function, this probably means you
 should switch to pwm_apply_state().
 
-The PWM user API also allows one to query the PWM state with pwm_get_state().
+The PWM user API also allows one to query the PWM state that was passed to the
+last invocation of pwm_apply_state() using pwm_get_state(). Note this is
+different to what the driver has actually implemented if the request cannot be
+satisfied exactly with the hardware in use. There is currently no way for
+consumers to get the actually implemented settings.
 
 In addition to the PWM state, the PWM API also exposes PWM arguments, which
 are the reference PWM config one should use on this PWM.