UPSTREAM: pwm: Introduce the pwm_state concept
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Thu, 14 Apr 2016 19:17:38 +0000 (21:17 +0200)
committerHuang, Tao <huangtao@rock-chips.com>
Mon, 6 Mar 2017 10:28:40 +0000 (18:28 +0800)
commit46307ce2a67b84d3924ed178f126024be5cd6f31
tree90e2a3e1c6d691263b9f0cd38adaa13d496140de
parent3805a8689260774a6ae397f09d5993182133d03f
UPSTREAM: pwm: Introduce the pwm_state concept

The PWM state, represented by its period, duty_cycle and polarity is
currently directly stored in the PWM device. Declare a pwm_state
structure embedding those field so that we can later use this struct
to atomically update all the PWM parameters at once.

All pwm_get_xxx() helpers are now implemented as wrappers around
pwm_get_state().

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit 43a276b003ed2e03de9d94b02a1ba49c1849b931)

Change-Id: I44037440bcc9d9164d18f3bfa1c8ff3e593925c5
Signed-off-by: David Wu <david.wu@rock-chips.com>
drivers/pwm/core.c
include/linux/pwm.h