pwm: sti: Initialise PWM capture device data
authorLee Jones <lee.jones@linaro.org>
Tue, 16 Aug 2016 09:35:03 +0000 (10:35 +0100)
committerThierry Reding <thierry.reding@gmail.com>
Thu, 8 Sep 2016 08:55:09 +0000 (10:55 +0200)
commit3f0925b5a864abded423dcedf86ec118139aa047
tree1801081ae35c990a81dfd4a46a672f91466a49bd
parentd66a928dc08f59b2c03bc22e910b058b4ea01f92
pwm: sti: Initialise PWM capture device data

Each PWM capture device is allocated a structure to hold its own state.
During a capture the device may be partaking in one of 3 phases. Initial
(rising) phase change, a subsequent (falling) phase change indicating
end of the duty-cycle phase and finally a final (rising) phase change
indicating the end of the period. The timer value snapshot each event is
held in a variable of the same name, and the phase number (0, 1, 2) is
contained in the index variable. Other device specific information, such
as GPIO pin, the IRQ wait queue and locking is also contained in the
structure. This patch initialises this structure for each of the
available devices.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-sti.c