Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 66b2a799 authored by Vevek Venkatesan's avatar Vevek Venkatesan
Browse files

input: touchscreen: st: turn off regulator during suspend



Add change to turn off the regulator during suspend, and
turn it on during resume.

Change-Id: Id83fd831622aaeab4d2b237a3bf5f1f2fc8122f1
Signed-off-by: default avatarVevek Venkatesan <vevekv@codeaurora.org>
parent 0c098091
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -134,6 +134,7 @@ static int fts_init_afterProbe(struct fts_ts_info *info);
static int fts_mode_handler(struct fts_ts_info *info, int force);
static int fts_command(struct fts_ts_info *info, unsigned char cmd);
static int fts_chip_initialization(struct fts_ts_info *info);
static int fts_enable_reg(struct fts_ts_info *info, bool enable);

active_tp_setup(st);

@@ -4021,6 +4022,11 @@ static void fts_resume_work(struct work_struct *work)

	__pm_wakeup_event(&info->wakeup_source, HZ);

	if (fts_enable_reg(info, true) < 0) {
		logError(1, "%s %s: ERROR Failed to enable regulators\n",
			tag, __func__);
	}

	if (info->ts_pinctrl) {
		/*
		 * Pinctrl handle is optional. If pinctrl handle is found
@@ -4083,6 +4089,8 @@ static void fts_suspend_work(struct work_struct *work)
				__func__, PINCTRL_STATE_SUSPEND);
		}
	}

	fts_enable_reg(info, false);
}