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

Commit accd0aed authored by Venkata Prahlad Valluru's avatar Venkata Prahlad Valluru
Browse files

input: touchscreen: enable/disable wakeup gestures for synaptics v2.6



Add devicetree property for wakeup gesture enable.
Override this choice through sysfs.

Change-Id: I61e386e89dda7ac12291a9b0138f649f71678ff8
Signed-off-by: default avatarVenkata Prahlad Valluru <vvalluru@codeaurora.org>
parent 7c320cb9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ Optional property:
 - synaptics,irq-on-state      : status of irq gpio.
 - synaptics,cap-button-codes  : virtual key code mappings to be used.
 - synaptics,vir-button-codes  : virtual key code and the response region on panel.
 - synaptics,wakeup-gestures-en: enable wakeup gestures.
 - synaptics,x-flip		       : modify orientation of the x axis.
 - synaptics,y-flip		       : modify orientation of the y axis.
 - synaptics,reset-delay-ms	   : reset delay for controller (ms), default 100.
+5 −4
Original line number Diff line number Diff line
@@ -55,8 +55,6 @@
#define TYPE_B_PROTOCOL
#endif

#define WAKEUP_GESTURE true

#define NO_0D_WHILE_2D
#define REPORT_2D_Z
#define REPORT_2D_W
@@ -1013,8 +1011,10 @@ static ssize_t synaptics_rmi4_wake_gesture_store(struct device *dev,

	input = input > 0 ? 1 : 0;

	if (rmi4_data->f11_wakeup_gesture || rmi4_data->f12_wakeup_gesture)
	if (rmi4_data->f11_wakeup_gesture || rmi4_data->f12_wakeup_gesture) {
		rmi4_data->enable_wakeup_gesture = input;
		rmi4_data->wakeup_gesture_en = input;
	}

	return count;
}
@@ -3111,7 +3111,7 @@ flash_prog_mode:
	}

	if (rmi4_data->f11_wakeup_gesture || rmi4_data->f12_wakeup_gesture)
		rmi4_data->enable_wakeup_gesture = WAKEUP_GESTURE;
		rmi4_data->enable_wakeup_gesture = rmi4_data->wakeup_gesture_en;
	else
		rmi4_data->enable_wakeup_gesture = false;

@@ -3951,6 +3951,7 @@ static int synaptics_rmi4_probe(struct platform_device *pdev)
	rmi4_data->suspend = false;
	rmi4_data->irq_enabled = false;
	rmi4_data->fingers_on_2d = false;
	rmi4_data->wakeup_gesture_en = bdata->wakeup_gesture_en;

	rmi4_data->reset_device = synaptics_rmi4_reset_device;
	rmi4_data->irq_enable = synaptics_rmi4_irq_enable;
+1 −0
Original line number Diff line number Diff line
@@ -371,6 +371,7 @@ struct synaptics_rmi4_data {
	bool fb_ready;
	bool f11_wakeup_gesture;
	bool f12_wakeup_gesture;
	bool wakeup_gesture_en;
	bool enable_wakeup_gesture;
	bool wedge_sensor;
	bool report_pressure;
+3 −0
Original line number Diff line number Diff line
@@ -81,6 +81,9 @@ static int parse_dt(struct device *dev, struct synaptics_dsx_board_data *bdata)
	bdata->resume_in_workqueue = of_property_read_bool(np,
			"synaptics,resume-in-workqueue");

	bdata->wakeup_gesture_en = of_property_read_bool(np,
			"synaptics,wakeup-gestures-en");

	retval = of_property_read_string(np, "synaptics,pwr-reg-name", &name);
	if (retval < 0)
		bdata->pwr_reg_name = NULL;
+1 −0
Original line number Diff line number Diff line
@@ -88,6 +88,7 @@ struct synaptics_dsx_board_data {
	bool y_flip;
	bool swap_axes;
	bool resume_in_workqueue;
	bool wakeup_gesture_en;
	int irq_gpio;
	int irq_on_state;
	int power_gpio;