mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
input: touchscreen: focaltech: add a new property
Add a new property to indicate power's state when sleep. Change-Id: Ic54fbbd0adee8716ad0b2d892814f8ac38b683c5 Signed-off-by: Fei Mao <feim1@codeaurora.org>
This commit is contained in:
parent
774e901388
commit
29c674dd9c
2 changed files with 10 additions and 2 deletions
|
|
@ -2476,6 +2476,9 @@ static int fts_parse_dt(struct device *dev, struct fts_ts_platform_data *pdata)
|
|||
FTS_INFO("max touch number:%d, irq gpio:%d, reset gpio:%d",
|
||||
pdata->max_touch_number, pdata->irq_gpio, pdata->reset_gpio);
|
||||
|
||||
pdata->power_always_on =
|
||||
of_property_read_bool(np, "focaltech,power-always-on");
|
||||
|
||||
ret = of_property_read_u32(np, "focaltech,ic-type", &temp_val);
|
||||
if (ret < 0)
|
||||
pdata->type = _FT3518;
|
||||
|
|
@ -2903,6 +2906,7 @@ static int fts_ts_suspend(struct device *dev)
|
|||
{
|
||||
int ret = 0;
|
||||
struct fts_ts_data *ts_data = fts_data;
|
||||
struct fts_ts_platform_data *pdata = ts_data->pdata;
|
||||
|
||||
FTS_FUNC_ENTER();
|
||||
if (ts_data->suspended) {
|
||||
|
|
@ -2934,7 +2938,8 @@ static int fts_ts_suspend(struct device *dev)
|
|||
if (ret < 0)
|
||||
FTS_ERROR("set TP to sleep mode fail, ret=%d", ret);
|
||||
|
||||
if (!ts_data->ic_info.is_incell) {
|
||||
if (!ts_data->ic_info.is_incell && !pdata->power_always_on) {
|
||||
|
||||
#if FTS_POWER_SOURCE_CUST_EN
|
||||
ret = fts_power_source_suspend(ts_data);
|
||||
if (ret < 0) {
|
||||
|
|
@ -2953,6 +2958,7 @@ static int fts_ts_suspend(struct device *dev)
|
|||
static int fts_ts_resume(struct device *dev)
|
||||
{
|
||||
struct fts_ts_data *ts_data = fts_data;
|
||||
struct fts_ts_platform_data *pdata = ts_data->pdata;
|
||||
|
||||
FTS_FUNC_ENTER();
|
||||
if (!ts_data->suspended) {
|
||||
|
|
@ -2971,7 +2977,8 @@ static int fts_ts_resume(struct device *dev)
|
|||
|
||||
if (!ts_data->ic_info.is_incell) {
|
||||
#if FTS_POWER_SOURCE_CUST_EN
|
||||
fts_power_source_resume(ts_data);
|
||||
if (!pdata->power_always_on)
|
||||
fts_power_source_resume(ts_data);
|
||||
#endif
|
||||
fts_reset_proc(200);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,6 +139,7 @@ struct fts_ts_platform_data {
|
|||
u32 x_min;
|
||||
u32 y_min;
|
||||
u32 max_touch_number;
|
||||
bool power_always_on;
|
||||
};
|
||||
|
||||
struct ts_event {
|
||||
|
|
|
|||
Loading…
Reference in a new issue