From 939dd20bb0f47775e2fc7a3c09fa753921c5a397 Mon Sep 17 00:00:00 2001 From: Konstantin Makariev Date: Fri, 10 Aug 2018 14:32:33 -0500 Subject: [PATCH] synaptics_mmi: support splash screen mode DRM framework not following full display power up sequence when splash screen enabled and thus first unblank notification is missing. This change enables interrupts handling on F34 load to work around that deficiency Change-Id: I00c2a93417e66ebce58ff5e85c7d0baafc9af14d Signed-off-by: Konstantin Makariev Reviewed-on: https://gerrit.mot.com/1224646 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Konstantin Makariev Submit-Approved: Jira Key --- .../input/touchscreen/synaptics_mmi/synaptics_dsx_i2c.c | 9 +++++++++ .../input/touchscreen/synaptics_mmi/synaptics_dsx_i2c.h | 1 + 2 files changed, 10 insertions(+) diff --git a/drivers/input/touchscreen/synaptics_mmi/synaptics_dsx_i2c.c b/drivers/input/touchscreen/synaptics_mmi/synaptics_dsx_i2c.c index a98b8118a5bf..d6e16677360e 100644 --- a/drivers/input/touchscreen/synaptics_mmi/synaptics_dsx_i2c.c +++ b/drivers/input/touchscreen/synaptics_mmi/synaptics_dsx_i2c.c @@ -1737,6 +1737,11 @@ static struct synaptics_dsx_platform_data * rmi4_data->purge_enabled = true; } + if (of_property_read_bool(np, "synaptics,splash-screen-mode")) { + pr_notice("splash screen mode\n"); + rmi4_data->splash_screen_mode = true; + } + retval = of_property_read_u32(np, "synaptics,pm-qos-latency", &rmi4_data->pm_qos_latency); if (!retval) @@ -6715,6 +6720,10 @@ static void synaptics_rmi4_detection_work(struct work_struct *work) rmi4_data->in_bootloader = true; pr_info("Product: %s is in bootloader mode\n", rmi->product_id_string); + } else if (rmi4_data->splash_screen_mode) { + /* Temporary work around DRM framework not following */ + /* full power up sequence in case of splash screen */ + synaptics_dsx_sensor_ready_state(rmi4_data, false); } /* replace default status retrieval function */ rmi4_data->get_status = exp_fhandler->func_status; diff --git a/drivers/input/touchscreen/synaptics_mmi/synaptics_dsx_i2c.h b/drivers/input/touchscreen/synaptics_mmi/synaptics_dsx_i2c.h index 167796fd55ce..b87d18535994 100644 --- a/drivers/input/touchscreen/synaptics_mmi/synaptics_dsx_i2c.h +++ b/drivers/input/touchscreen/synaptics_mmi/synaptics_dsx_i2c.h @@ -500,6 +500,7 @@ struct synaptics_rmi4_data { int sensor_max_y; bool irq_enabled; atomic_t touch_stopped; + bool splash_screen_mode; bool flash_enabled; bool ic_on; bool fingers_on_2d;