input: touchscreen: bu21150: maintain IRQ balance
IRQ is enabled at resume when AFE HAL calles bu21150_ioctl_resume. With particular timing sequence, this call may not happen. For example, when LCD turns on at time t1, daemon receives uevent of LCD on at t2 and daemon sets active scan mode to AFE through AFE HAL. AFE HAL calls ioctl_resume after the scan mode setting is completed. If before t2, LCD turns off because proximity sensor is blocked, the SPI writes for setting scan mode will fail, because the LCD state and AFE scan mode have a conflict. When setting scan mode fails, AFE HAL will not call ioctl_resume. Thus IRQ is not enabled. This causes IRQ count to go out of balance and touch to stop working. The fix is to maintain IRQ count in the driver so that when IRQ is already disabled, it won't be disabled again; when it is already enabled, it won't be enabled again. Change-Id: I6e6e0aaaebde3025dc9c08c9403d986cd3d2e1e6 Signed-off-by:Jing Lin <jinglin@codeaurora.org> Signed-off-by:
Jigarkumar Kishorkumar Zala <j_zala@codeaurora.org> Signed-off-by:
Bharat Pawar <bpawar@codeaurora.org>
Loading
Please register or sign in to comment