From 7944ac7a8d595a6cf2d3f77ec2ffd8e9c1bffec3 Mon Sep 17 00:00:00 2001 From: Zhibin Huang Date: Wed, 17 Apr 2024 16:44:20 +0800 Subject: [PATCH] Revert "input: touchscreen: chipone_9551r add early_suspend" This reverts commit 31332790205720362358ca389b2cd274caa7317c. Change-Id: I60d405600b3b79168146e2635a8f8ce98f459492 Signed-off-by: Zhibin Huang --- .../touchscreen/chipone_tddi/cts_config.h | 2 +- .../input/touchscreen/chipone_tddi/cts_core.h | 7 ----- .../touchscreen/chipone_tddi/cts_driver.c | 31 ------------------- 3 files changed, 1 insertion(+), 39 deletions(-) diff --git a/drivers/input/touchscreen/chipone_tddi/cts_config.h b/drivers/input/touchscreen/chipone_tddi/cts_config.h index 659a076e7681..d9581056203c 100644 --- a/drivers/input/touchscreen/chipone_tddi/cts_config.h +++ b/drivers/input/touchscreen/chipone_tddi/cts_config.h @@ -19,7 +19,7 @@ //#define CFG_CTS_CASCADE_SUPPORTED /* Support RK dsi extcon notifier for suspend and resume */ -//#define CONFIG_PM_DSI_EXTCON_NOTIFIER +#define CONFIG_PM_DSI_EXTCON_NOTIFIER /* Support both finger and stylus protocol, 11 */ // #define CFG_CTS_FINGER_STYLUS_SUPPORTED diff --git a/drivers/input/touchscreen/chipone_tddi/cts_core.h b/drivers/input/touchscreen/chipone_tddi/cts_core.h index 149f8f4bdba5..955491378292 100644 --- a/drivers/input/touchscreen/chipone_tddi/cts_core.h +++ b/drivers/input/touchscreen/chipone_tddi/cts_core.h @@ -4,9 +4,6 @@ #define CTS_CORE_H #include "cts_config.h" -#ifdef CONFIG_HAS_EARLYSUSPEND -#include -#endif enum cts_dev_hw_reg { CTS_DEV_HW_REG_HARDWARE_ID = 0x70000u, @@ -532,10 +529,6 @@ struct chipone_ts_data { struct extcon_dev *edev; struct notifier_block extcon_nb; #endif - -#ifdef CONFIG_HAS_EARLYSUSPEND - struct early_suspend early_suspend; -#endif }; /*static inline u32 get_unaligned_le24(const void *p) diff --git a/drivers/input/touchscreen/chipone_tddi/cts_driver.c b/drivers/input/touchscreen/chipone_tddi/cts_driver.c index 2ee9947c02dc..3ebd444b2eb0 100644 --- a/drivers/input/touchscreen/chipone_tddi/cts_driver.c +++ b/drivers/input/touchscreen/chipone_tddi/cts_driver.c @@ -372,26 +372,6 @@ static int ts_extcon_notifier(struct notifier_block *self, } #endif -#ifdef CONFIG_HAS_EARLYSUSPEND -/* earlysuspend module the suspend/resume procedure */ -static void cts_ts_early_suspend(struct early_suspend *h) -{ - struct chipone_ts_data *cts_data = container_of(h, struct chipone_ts_data, early_suspend); - - pr_info("%s %d\n", __func__, __LINE__); - flush_work(&cts_data->ts_resume_work); - cts_suspend(cts_data); -} - -static void cts_ts_late_resume(struct early_suspend *h) -{ - struct chipone_ts_data *cts_data = container_of(h, struct chipone_ts_data, early_suspend); - - pr_info("%s %d\n", __func__, __LINE__); - queue_work(cts_data->workqueue, &cts_data->ts_resume_work); -} -#endif - #ifdef CONFIG_CTS_I2C_HOST static int cts_driver_probe(struct i2c_client *client, const struct i2c_device_id *id) @@ -635,13 +615,6 @@ static int cts_driver_probe(struct spi_device *client) #endif /* CONFIG_MTK_PLATFORM */ #endif -#ifdef CONFIG_HAS_EARLYSUSPEND - cts_data->early_suspend.level = EARLY_SUSPEND_LEVEL_BLANK_SCREEN + 1; - cts_data->early_suspend.suspend = cts_ts_early_suspend; - cts_data->early_suspend.resume = cts_ts_late_resume; - register_early_suspend(&cts_data->early_suspend); -#endif - #ifdef CONFIG_PM_DSI_EXTCON_NOTIFIER cts_data->edev = extcon_get_edev_by_phandle(&client->dev, 0); if (IS_ERR(cts_data->edev)) { @@ -783,10 +756,6 @@ static void cts_driver_remove(struct spi_device *client) #endif #endif -#ifdef CONFIG_HAS_EARLYSUSPEND - unregister_early_suspend(&cts_data->early_suspend); -#endif - cts_tool_deinit(cts_data); cts_sysfs_remove_device(&client->dev);