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

Commit c9e0f46c authored by Christopher N. Hesse's avatar Christopher N. Hesse Committed by bonuzzz
Browse files

input: hall: Invert flip cover condition

AOSP expects SW_LID instead of SW_FLIP.

Change-Id: Ifbea1ec866385f5f1241994836f3276a77fa8a90
(cherry picked from commit deda13ecca04e87600c1c559e1bdcb0a0d36a2d6)
parent fe0feeeb
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -165,7 +165,7 @@ static void flip_cover_work(struct work_struct *work)

	if(first == second) {
		flip_cover = first;
		input_report_switch(ddata->input, SW_FLIP, flip_cover);
		input_report_switch(ddata->input, SW_LID, !flip_cover);
		input_sync(ddata->input);
	}
}
@@ -198,7 +198,7 @@ static void flip_cover_work(struct work_struct *work)
#endif
	flip_cover = first;
	input_report_switch(ddata->input,
			SW_FLIP, flip_cover);
			SW_LID, !flip_cover);
	input_sync(ddata->input);
}
#endif
@@ -370,7 +370,7 @@ static int hall_probe(struct platform_device *pdev)
	input->dev.parent = &pdev->dev;

	input->evbit[0] |= BIT_MASK(EV_SW);
	input_set_capability(input, EV_SW, SW_FLIP);
	input_set_capability(input, EV_SW, SW_LID);

	input->open = hall_open;
	input->close = hall_close;