mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
Add power flag to indicate power status.
TP: Add power status flag to indicate whether it is powered on or powered off. Set power state when power on and power off. Change-Id: I9f8677278a2bc358233e7221ee564b69e4b75dcc Reviewed-on: https://gerrit.mot.com/1538895 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Jialei Hao <haojl2@motorola.com> Reviewed-by: Jianqi Yang <yangj@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
cb2f525a09
commit
0fd56bb285
2 changed files with 4 additions and 1 deletions
|
|
@ -457,6 +457,7 @@ struct syna_tcm_hcd {
|
|||
wait_queue_head_t hdl_wq;
|
||||
wait_queue_head_t reflash_wq;
|
||||
int irq;
|
||||
bool power_status;
|
||||
bool do_polling;
|
||||
bool in_suspend;
|
||||
bool irq_enabled;
|
||||
|
|
|
|||
|
|
@ -457,7 +457,7 @@ static int syna_ts_mmi_methods_get_poweron(struct device *dev, void *idata)
|
|||
struct platform_device *pdev;
|
||||
|
||||
GET_SYNA_DATA(dev);
|
||||
TO_INT(idata) = tcm_hcd->in_suspend == 0 ? 1 : 0;
|
||||
TO_INT(idata) = tcm_hcd->power_status == 0 ? 1 : 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -576,6 +576,7 @@ static int syna_ts_mmi_methods_power(struct device *dev, int on)
|
|||
}
|
||||
msleep(bdata->power_delay_ms);
|
||||
}
|
||||
tcm_hcd->power_status = true;
|
||||
return 0;
|
||||
|
||||
disable_pwr_reg:
|
||||
|
|
@ -585,6 +586,7 @@ disable_bus_reg:
|
|||
if (tcm_hcd->bus_reg)
|
||||
regulator_disable(tcm_hcd->bus_reg);
|
||||
exit:
|
||||
tcm_hcd->power_status = false;
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue