]> git.karo-electronics.de Git - linux-beck.git/commit
pwm: Add a helper to prepare a new PWM state
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 14 Jun 2016 09:13:09 +0000 (11:13 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Fri, 8 Jul 2016 15:52:18 +0000 (17:52 +0200)
commita6a0dbbcfa469cf3e5c4d9522106c0b7b9e9e373
treece43ebafbd0d41bd485b7d5751a3b02aee914ef4
parent1a695a905c18548062509178b98bc91e67510864
pwm: Add a helper to prepare a new PWM state

The pwm_init_state() helper prepares a new state object containing the
current PWM state except for the polarity and period fields which are
set to the reference values (those in struct pwm_args).

This is particularly useful for PWM users who want to apply a new duty-
cycle expressed relatively to the reference period without changing the
enable state.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
include/linux/pwm.h