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

Commit 7c7d8dc0 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "input: touchscreen: st: add XY axis flip property support"

parents 759a01db 52a3b681
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -2791,6 +2791,11 @@ static void fts_enter_pointer_event_handler(struct fts_ts_info *info,
	if (z == 0)
		z = 10;

	if (info->bdata->x_flip)
		x = X_AXIS_MAX - x;
	if (info->bdata->y_flip)
		y = Y_AXIS_MAX - y;

	if (x == X_AXIS_MAX)
		x--;

@@ -4346,6 +4351,9 @@ static int parse_dt(struct device *dev,
		bdata->reset_gpio = GPIO_NOT_DEFINED;
	}

	bdata->x_flip = of_property_read_bool(np, "st,x-flip");
	bdata->y_flip = of_property_read_bool(np, "st,y-flip");

	return OK;
}

+2 −0
Original line number Diff line number Diff line
@@ -183,6 +183,8 @@ extern struct mutex gestureMask_mutex;
#endif

struct fts_i2c_platform_data {
	bool x_flip;
	bool y_flip;
	int (*power)(bool on);
	int irq_gpio;
	int reset_gpio;