aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2025-05-27 15:01:47 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2025-05-27 15:01:47 -0700
commit11147c16a6e0649cc95f8bb90302e4a99ece30bc (patch)
tree4ae8f5f2f50dd1b96b30d874bb4164020514395f /include
parentMerge tag 'chrome-platform-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux (diff)
parentdt-bindings: timer: renesas,tpu: remove binding documentation (diff)
downloadwireguard-linux-11147c16a6e0649cc95f8bb90302e4a99ece30bc.tar.xz
wireguard-linux-11147c16a6e0649cc95f8bb90302e4a99ece30bc.zip
Merge tag 'pwm/for-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux
Pull pwm updates from Uwe Kleine-König: "This time around the pwm changes for the next release contain three new drivers (loongson, mc33xs2410 and rzg2l-gpt) and the usual collection of cleanups in both the core and drivers, support for new variants in existing drivers, conversion of dt bindings to yaml and documentation updates. Thanks for contributions and reviews go to Alexey Charkov, AngeloGioacchino Del Regno, Bartosz Golaszewski, Biju Das, Binbin Zhou, Dan Carpenter, Dimitri Fedrau, Geert Uytterhoeven, George Stark, Huacai Chen, Juxin Gao, Krzysztof Kozlowski, Kuninori Morimoto, Laurent Pinchart, Neil Armstrong, Nuno Sá, Rob Herring, and Trevor Gamblin" * tag 'pwm/for-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux: (39 commits) dt-bindings: timer: renesas,tpu: remove binding documentation pwm: adp5585: make sure to include mod_devicetable.h pwm: Tidyup PWM menu for Renesas pwm: Restore alphabetic ordering in Kconfig and Makefile pwm: Formally describe the procedure used to pick a hardware waveform setting pwm: Let pwm_set_waveform_might_sleep() return 0 instead of 1 after rounding up pwm: Let pwm_set_waveform_might_sleep() fail for exact but impossible requests ARM: shmobile: defconfig: Enable more support for RZN1D-DB/EB arm64: defconfig: Add Renesas MSIOF sound support arm64: defconfig: Enable Renesas RZ/G2L GPT config pwm: add support for NXPs high-side switch MC33XS2410 dt-bindings: pwm: add support for MC33XS2410 pwm: rzg2l-gpt: Accept requests for too high period length dt-bindings: pwm: vt8500-pwm: Convert to YAML dt-bindings: pwm: mediatek,pwm-disp: Add compatible for MT6893 pwm: Fix various formatting issues in kernel-doc pwm: Add support for RZ/G2L GPT dt-bindings: pwm: Add RZ/G2L GPT binding pwm: Better document return value of pwm_round_waveform_might_sleep() pwm: loongson: Fix an error code in probe() ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/pwm.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index 9ece4e5d3815..63a17d2b4ec8 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -218,6 +218,8 @@ static inline void pwm_init_state(const struct pwm_device *pwm,
*
* pwm_get_state(pwm, &state);
* duty = pwm_get_relative_duty_cycle(&state, 100);
+ *
+ * Returns: rounded relative duty cycle multiplied by @scale
*/
static inline unsigned int
pwm_get_relative_duty_cycle(const struct pwm_state *state, unsigned int scale)
@@ -244,8 +246,8 @@ pwm_get_relative_duty_cycle(const struct pwm_state *state, unsigned int scale)
* pwm_set_relative_duty_cycle(&state, 50, 100);
* pwm_apply_might_sleep(pwm, &state);
*
- * This functions returns -EINVAL if @duty_cycle and/or @scale are
- * inconsistent (@scale == 0 or @duty_cycle > @scale).
+ * Returns: 0 on success or ``-EINVAL`` if @duty_cycle and/or @scale are
+ * inconsistent (@scale == 0 or @duty_cycle > @scale)
*/
static inline int
pwm_set_relative_duty_cycle(struct pwm_state *state, unsigned int duty_cycle,
@@ -351,7 +353,7 @@ struct pwm_chip {
* pwmchip_supports_waveform() - checks if the given chip supports waveform callbacks
* @chip: The pwm_chip to test
*
- * Returns true iff the pwm chip support the waveform functions like
+ * Returns: true iff the pwm chip support the waveform functions like
* pwm_set_waveform_might_sleep() and pwm_round_waveform_might_sleep()
*/
static inline bool pwmchip_supports_waveform(struct pwm_chip *chip)
@@ -369,7 +371,7 @@ static inline struct device *pwmchip_parent(const struct pwm_chip *chip)
return chip->dev.parent;
}
-static inline void *pwmchip_get_drvdata(struct pwm_chip *chip)
+static inline void *pwmchip_get_drvdata(const struct pwm_chip *chip)
{
return dev_get_drvdata(&chip->dev);
}