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

Commit b1351ef7 authored by Xin Hua Lu's avatar Xin Hua Lu
Browse files

input: touchscreen: fts: allow fingerprint aoi disablem



allow fingerprint aoi disablem.

Change-Id: I7563ff544eb840e99f6a9f1d06d461e3829d3055
Signed-off-by: default avatarXin Hua Lu <luxinhua@codeaurora.org>
parent c6584024
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -48,19 +48,24 @@ ssize_t aoi_set_store(struct device *dev, struct device_attribute *attr,
	if (ret != 4)
		return -EINVAL;

	if (left < 0 || left > X_AXIS_MAX || right < 0 || right > X_AXIS_MAX) {
	if (right > X_AXIS_MAX)
		right = X_AXIS_MAX;
	if (bottom > Y_AXIS_MAX)
		bottom = Y_AXIS_MAX;

	if (left < 0 || left > X_AXIS_MAX || right < 0) {
		info->aoi_notify_enabled = false;
		return -EINVAL;
	}

	if (top < 0 || top > Y_AXIS_MAX || bottom < 0 || bottom > Y_AXIS_MAX) {
	if (top < 0 || top > Y_AXIS_MAX || bottom < 0) {
		info->aoi_notify_enabled = false;
		return -EINVAL;
	}

	if (left >= right || top >= bottom) {
		info->aoi_notify_enabled = false;
		return -EINVAL;
		return count;
	}

	info->aoi_left = left;