OSDN Git Service

leds: qpnp-haptics: Allow duration for buffer mode
authorSubbaraman Narayanamurthy <subbaram@codeaurora.org>
Mon, 8 Jan 2018 22:57:12 +0000 (14:57 -0800)
committerGerrit - the friendly Code Review server <code-review@localhost>
Fri, 15 Feb 2019 11:16:18 +0000 (03:16 -0800)
commit5596c6093d19bc60a3c6d91e30347394c8b06914
tree998980d96d671422f7fa067c927b9e97b6f58bac
parent7acdf203cfc3cbd30c51e9f3f8db70e614bb9b32
leds: qpnp-haptics: Allow duration for buffer mode

Currently, duration is not allowed to be set while playing the
pattern in buffer mode. This works fine. However when playing
multiple sample sets, the last sample set might be stopped early
as the play interrupt fires immediately after configuring the
new sample set. Fix this by calculating the duration based on the
wave samples configured and the play rate.

Change-Id: I67b1741d435e07bf7332f7e36231fefa9129a9a6
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Signed-off-by: Shilpa Suresh <sbsure@codeaurora.org>
drivers/leds/leds-qpnp-haptics.c