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: NBoris Brezillon <boris.brezillon@free-electrons.com> Tested-by: NHeiko Stuebner <heiko@sntech.de> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
Showing
想要评论请 注册 或 登录