diff options
| author | Jack Pham <jackp@codeaurora.org> | 2016-08-10 22:56:34 -0700 |
|---|---|---|
| committer | Jack Pham <jackp@codeaurora.org> | 2016-08-16 16:26:21 -0700 |
| commit | a8967b290f0436355eedd711c2a35d8b7f67caba (patch) | |
| tree | 6e9b20488ef0504d621b31eeea5453416268244e /include/linux/fpga/fpga-mgr.h | |
| parent | 33213bdef3d86a022b1d8423ef566a8de0e2bffe (diff) | |
usb: pd: Improve timing accuracy
queue_delayed_work(), which is based on jiffies, is not
appropriate for accurate timing, such as timeouts needing
resolution on the order of milliseconds. Instead introduce
an hrtimer which upon timeout will call regular queue_work().
Redefine timeout values based on the PD spec minimum amounts
as these are generally the minimum time the policy engine
needs to wait before peforming the next action.
msleep() is also jiffies-based, so replace with usleep_range()
for the same reason. Further, PE_SRC_TRANSITION_SUPPLY can
simply be inlined as part of the PE_SRC_NEGOTIATE_CAPABILITY state
using an in-place sleep.
Change-Id: Id8c9eb8937b67d4deaad8b61d9ff2349cbe7f4ed
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Diffstat (limited to 'include/linux/fpga/fpga-mgr.h')
0 files changed, 0 insertions, 0 deletions
