pwm: Add relative duty cycle manipulation helpers
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 14 Jun 2016 09:13:10 +0000 (11:13 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Fri, 8 Jul 2016 15:52:19 +0000 (17:52 +0200)
commitf6f3bddf7b2b994a927808fcc5a3d07069c35956
treeea4b977c05eee37a08393720a22e69e5c100c0f5
parenta6a0dbbcfa469cf3e5c4d9522106c0b7b9e9e373
pwm: Add relative duty cycle manipulation helpers

The PWM framework expects PWM users to configure the duty cycle in nano-
seconds, but many users want to express the duty cycle relatively to the
period value (i.e. duty_cycle = 33% of the period).

Add the pwm_{get,set}_relative_duty_cycle() helpers to ease this kind of
conversion.

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
This page took 0.027583 seconds and 5 git commands to generate.