There is a possibility of receiving a release interrupt before press when both these actions (press and release) of the power-key are very close-by (~1-2ms) to the debounce time of the key. Handle this case by maintaining a state variable. Also mark the release interrupt as a wakeup source to wakeup the system when the above mentioned abnormal case occurs. CRs-Fixed: 394289 Change-Id: I74475c1e5159dd30e52aca91243eec7e2fac4d57 Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org> (cherry picked from commit 306e3197b5cc657a62c41823fb6cd03600d35f3f) Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>