OSDN Git Service

synaptics_dsx_force: guard test reporting
authorDemon Singur <demonsingur@gmail.com>
Sat, 31 Mar 2018 10:56:42 +0000 (10:56 +0000)
committerArian <arian.kulmer@web.de>
Tue, 19 Nov 2019 15:24:30 +0000 (16:24 +0100)
Change-Id: I4cae16efcae5d1fa7aa1b1a6f7851e4fe9200edd

drivers/input/touchscreen/synaptics_dsx_force/synaptics_dsx_core.c
drivers/input/touchscreen/synaptics_dsx_force/synaptics_dsx_core.h

index 2f474f1..5e3c9a4 100644 (file)
@@ -5034,7 +5034,9 @@ static int synaptics_rmi4_probe(struct platform_device *pdev)
        mutex_init(&(rmi4_data->rmi4_irq_enable_mutex));
        mutex_init(&(rmi4_data->rmi4_cover_mutex));
 
+#ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_TEST_REPORTING_FORCE
        init_completion(&rmi4_data->dump_completion);
+#endif
 
        platform_set_drvdata(pdev, rmi4_data);
 
@@ -5638,17 +5640,20 @@ static int synaptics_rmi4_fb_notifier_cb(struct notifier_block *self,
                                        rmi4_data->wakeup_en = false;
                                }
 
+#ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_TEST_REPORTING_FORCE
                                rmi4_data->disable_data_dump = false;
+#endif
                        }
                } else if (event == FB_EARLY_EVENT_BLANK) {
                        transition = evdata->data;
                        if ((*transition == FB_BLANK_POWERDOWN) || (*transition == FB_BLANK_NORMAL)) {
+#ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_TEST_REPORTING_FORCE
                                rmi4_data->disable_data_dump = true;
                                if (rmi4_data->dump_flags) {
                                        reinit_completion(&rmi4_data->dump_completion);
                                        wait_for_completion_timeout(&rmi4_data->dump_completion, 4 * HZ);
                                }
-
+#endif
                                if (rmi4_data->enable_wakeup_gesture) {
                                        rmi4_data->wakeup_en = true;
                                        mdss_regulator_ctrl(rmi4_data, DISP_REG_ALL, true);
@@ -5700,7 +5705,9 @@ static int synaptics_rmi4_fb_notifier_cb_tddi(struct notifier_block *self,
                                        rmi4_data->fb_ready = true;
                                }
 
+#ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_TEST_REPORTING_FORCE
                                rmi4_data->disable_data_dump = false;
+#endif
                        } else if ((*transition == FB_BLANK_POWERDOWN) || (*transition == FB_BLANK_NORMAL)) {
                                if (rmi4_data->wakeup_en) {
                                        synaptics_rmi4_suspend(&rmi4_data->pdev->dev);
@@ -5716,12 +5723,13 @@ static int synaptics_rmi4_fb_notifier_cb_tddi(struct notifier_block *self,
                                        msleep(30);
                                }
                        } else if ((*transition == FB_BLANK_POWERDOWN) || (*transition == FB_BLANK_NORMAL)) {
+#ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_TEST_REPORTING_FORCE
                                rmi4_data->disable_data_dump = true;
                                if (rmi4_data->dump_flags) {
                                        reinit_completion(&rmi4_data->dump_completion);
                                        wait_for_completion_timeout(&rmi4_data->dump_completion, 4 * HZ);
                                }
-
+#endif
                                if (rmi4_data->enable_wakeup_gesture) {
                                        rmi4_data->wakeup_en = true;
                                        mdss_panel_reset_skip_enable(true);
index 718c11e..42136f7 100644 (file)
@@ -405,8 +405,12 @@ struct synaptics_rmi4_data {
        bool chip_is_tddi;
        bool open_test_b7;
        bool short_test_extend;
+
+#ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_TEST_REPORTING_FORCE
        bool disable_data_dump;
        bool dump_flags;
+#endif
+
        bool enable_reversed_keys;
 
        int (*reset_device)(struct synaptics_rmi4_data *rmi4_data,
@@ -422,7 +426,9 @@ struct synaptics_rmi4_data {
        struct pinctrl_state *pinctrl_state_suspend;
        struct synaptics_dsx_factory_param *factory_param;
 
+#ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_TEST_REPORTING_FORCE
        struct completion dump_completion;
+#endif
 #ifdef CONFIG_TOUCH_DEBUG_FS
        struct dentry *debugfs;
 #endif