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

Commit c07e54b1 authored by Shantanu Jain's avatar Shantanu Jain
Browse files

input: synaptics_dsx_2.6: enable wakeup gesture for synaptics driver



Enable wakeup gesture for Synaptics V2.6 touch driver. Below changes
are added for the same:
- Enable the wakeup gesture as it was disabled by default as a macro.
- Add change to suspend the touch device for FB_BLANK_VSYNC_SUSPEND
fb event, when display goes to dim setting for this event.
- Enable wakeup feature and make irq as wake-able only once while
going suspend or resume.
- Don't put off regulators when wakeup geature is enabled.

Change-Id: Icd59de0411d92a791bbeb08ec3d368359edf8993
Signed-off-by: default avatarShantanu Jain <shjain@codeaurora.org>
parent 1d4c367d
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@
#define TYPE_B_PROTOCOL
#endif

#define WAKEUP_GESTURE false
#define WAKEUP_GESTURE true

#define NO_0D_WHILE_2D
#define REPORT_2D_Z
@@ -4422,7 +4422,8 @@ static int synaptics_rmi4_fb_notifier_cb(struct notifier_block *self,
				synaptics_secure_touch_stop(rmi4_data, false);
			} else if (event == FB_EVENT_BLANK) {
				transition = evdata->data;
				if (*transition == FB_BLANK_POWERDOWN) {
				if (*transition == FB_BLANK_POWERDOWN ||
					*transition == FB_BLANK_VSYNC_SUSPEND) {
					flush_work(
						&(rmi4_data->fb_notify_work));
					synaptics_rmi4_suspend(
@@ -4563,8 +4564,10 @@ static int synaptics_rmi4_suspend(struct device *dev)
	synaptics_secure_touch_stop(rmi4_data, true);

	if (rmi4_data->enable_wakeup_gesture) {
		if (!rmi4_data->suspend) {
			synaptics_rmi4_wakeup_gesture(rmi4_data, true);
			enable_irq_wake(rmi4_data->irq);
		}
		goto exit;
	}

@@ -4591,7 +4594,7 @@ exit:
	}
	mutex_unlock(&exp_data.mutex);

	if (!rmi4_data->suspend) {
	if (!rmi4_data->suspend && !rmi4_data->enable_wakeup_gesture) {
		synaptics_rmi4_enable_reg(rmi4_data, false);
		synaptics_rmi4_get_reg(rmi4_data, false);
	}
@@ -4620,8 +4623,10 @@ static int synaptics_rmi4_resume(struct device *dev)
	synaptics_secure_touch_stop(rmi4_data, true);

	if (rmi4_data->enable_wakeup_gesture) {
		if (rmi4_data->suspend) {
			synaptics_rmi4_wakeup_gesture(rmi4_data, false);
			disable_irq_wake(rmi4_data->irq);
		}
		goto exit;
	}