sonyxperiadev / kernel

Other
352 stars 362 forks source link

[2.0.r1] Make LX Semicon touchscreen happy for SoMC Yodo #2606

Closed bartcubbins closed 6 months ago

bartcubbins commented 6 months ago

input: ts: lxs: Fix lxs_ts_suspend/resume() calling SDE DRM driver triggers the DRM_PANEL_EVENT_BLANK/UNBLANK events twice, during pre commit and post commit. Since the touchscreen pinctrl is handled by the display driver, we must follow a strict suspend/resume sequence. Fortunately, the panel event notifier driver, using the early_trigger variable, allows us to determine exactly when the event was triggered. Therefore, add checks that will allow to call the corresponding handlers only once and at the right time:

Also, probe_done checks have been removed since they are already contained in the corresponding suspend/resume functions.

input: ts: lxs: Ensure proper handling of reset completion Previously, the reset_is_on_going flag was not reset after the completion of the reset operation in the lxs_hal_reset() function. This could lead to incorrect behavior if subsequent reset operations were attempted.

This commit addresses the issue by setting the reset_is_on_going flag to false after the completion of the reset operation. This ensures that subsequent reset requests are handled correctly.

input: ts: lxs: Add after_probe start to workqueue Add after_probe start to workqueue at the end of the probe to get a functioning touchscreen immediately after probing.