From 02659fa2884469713dfc30907e0eab9c3d4a0ea7 Mon Sep 17 00:00:00 2001 From: Yingyuan Zhu Date: Fri, 26 Oct 2018 20:14:06 +0800 Subject: [PATCH] adc_key: delete early_suspend code [1/1] PD#OTT-144 Problem: after the dark screen, the adc button does not work Solution: The adc_keypad introduces earlysuspend for MID project: after the LCD backlight disable, prevent the user from pressing the key to open some applications and not complete standby. Now check the adc button using the "system_freezable_wq" system queue, which replaces the function of the code.So can remove it. Verify: g12b socket Change-Id: I2333ba3dc406d2624962d116293a0b9d36f97534 Signed-off-by: Yingyuan Zhu --- drivers/amlogic/input/keyboard/adc_keypad.c | 30 +---------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/drivers/amlogic/input/keyboard/adc_keypad.c b/drivers/amlogic/input/keyboard/adc_keypad.c index a9f5ff9..7182e595 100644 --- a/drivers/amlogic/input/keyboard/adc_keypad.c +++ b/drivers/amlogic/input/keyboard/adc_keypad.c @@ -100,25 +100,6 @@ static void meson_adc_kp_poll(struct input_polled_dev *dev) } -#ifdef CONFIG_AMLOGIC_LEGACY_EARLY_SUSPEND -static void meson_adc_kp_early_suspend(struct early_suspend *h) -{ - struct meson_adc_kp *kp = container_of(h, - struct meson_adc_kp, early_suspend); - - cancel_delayed_work_sync(&kp->poll_dev->work); -} - -static void meson_adc_kp_late_resume(struct early_suspend *h) -{ - struct meson_adc_kp *kp = container_of(h, - struct meson_adc_kp, early_suspend); - - queue_delayed_work(system_freezable_wq, &kp->poll_dev->work, - msecs_to_jiffies(kp->poll_dev->poll_interval)); -} -#endif - static void send_data_to_bl301(void) { u32 val; @@ -553,13 +534,6 @@ static int meson_adc_kp_probe(struct platform_device *pdev) input->keycodesize = sizeof(unsigned short); input->keycodemax = 0x1ff; -#ifdef CONFIG_AMLOGIC_LEGACY_EARLY_SUSPEND - kp->early_suspend.level = EARLY_SUSPEND_LEVEL_BLANK_SCREEN; - kp->early_suspend.suspend = meson_adc_kp_early_suspend; - kp->early_suspend.resume = meson_adc_kp_late_resume; - register_early_suspend(&kp->early_suspend); -#endif - /*init class*/ kp->kp_class.name = DRIVE_NAME; kp->kp_class.owner = THIS_MODULE; @@ -593,9 +567,7 @@ static int meson_adc_kp_remove(struct platform_device *pdev) struct meson_adc_kp *kp = platform_get_drvdata(pdev); class_unregister(&kp->kp_class); -#ifdef CONFIG_AMLOGIC_LEGACY_EARLY_SUSPEND - unregister_early_suspend(&kp->early_suspend); -#endif + cancel_delayed_work(&kp->poll_dev->work); meson_adc_kp_list_free(kp); kfree(kp); return 0; -- 2.7.4