diff --git a/drivers/amlogic/cec/hdmi_ao_cec.c b/drivers/amlogic/cec/hdmi_ao_cec.c index 55eb954116a9..d1fa78717e86 100644 --- a/drivers/amlogic/cec/hdmi_ao_cec.c +++ b/drivers/amlogic/cec/hdmi_ao_cec.c @@ -56,11 +56,7 @@ #include #include #include - -#ifdef CONFIG_HAS_EARLYSUSPEND -#include -static struct early_suspend aocec_suspend_handler; -#endif +#include #include "hdmi_ao_cec.h" @@ -75,6 +71,10 @@ static struct early_suspend aocec_suspend_handler; #define HR_DELAY(n) (ktime_set(0, n * 1000 * 1000)) #define MAX_INT 0x7ffffff +#ifdef CONFIG_AMLOGIC_LEGACY_EARLY_SUSPEND +static struct early_suspend aocec_suspend_handler; +#endif + struct cec_platform_data_s { /*unsigned int chip_id;*/ unsigned char line_reg;/*cec gpio_i reg:0 ao;1 periph*/ @@ -2110,9 +2110,9 @@ static void cec_rx_process(void) if (cec_dev->cec_suspend == CEC_DEEP_SUSPEND) cec_report_power_status(initiator, POWER_STANDBY); else if (cec_dev->cec_suspend == CEC_EARLY_SUSPEND) - cec_report_power_status(initiator, TRANS_ON_TO_STANDBY); + cec_report_power_status(initiator, POWER_STANDBY); else if (cec_dev->cec_suspend == CEC_POWER_RESUME) - cec_report_power_status(initiator, TRANS_STANDBY_TO_ON); + cec_report_power_status(initiator, POWER_ON); else cec_report_power_status(initiator, POWER_ON); break; @@ -3251,7 +3251,7 @@ static const struct file_operations hdmitx_cec_fops = { }; /************************ cec high level code *****************************/ -#ifdef CONFIG_HAS_EARLYSUSPEND +#ifdef CONFIG_AMLOGIC_LEGACY_EARLY_SUSPEND static void aocec_early_suspend(struct early_suspend *h) { cec_dev->cec_suspend = CEC_EARLY_SUSPEND; @@ -3712,13 +3712,14 @@ static int aml_cec_probe(struct platform_device *pdev) goto tag_cec_msg_alloc_err; } -#ifdef CONFIG_HAS_EARLYSUSPEND +#ifdef CONFIG_AMLOGIC_LEGACY_EARLY_SUSPEND aocec_suspend_handler.level = EARLY_SUSPEND_LEVEL_BLANK_SCREEN - 20; aocec_suspend_handler.suspend = aocec_early_suspend; aocec_suspend_handler.resume = aocec_late_resume; aocec_suspend_handler.param = cec_dev; register_early_suspend(&aocec_suspend_handler); #endif + hrtimer_init(&start_bit_check, CLOCK_MONOTONIC, HRTIMER_MODE_REL); start_bit_check.function = cec_line_check; cec_dev->cec_thread = create_workqueue("cec_work"); diff --git a/drivers/amlogic/cec/hdmi_ao_cec.h b/drivers/amlogic/cec/hdmi_ao_cec.h index e53e1e8a2022..9dff817b6f81 100644 --- a/drivers/amlogic/cec/hdmi_ao_cec.h +++ b/drivers/amlogic/cec/hdmi_ao_cec.h @@ -19,8 +19,7 @@ #define __AO_CEC_H__ - -#define CEC_DRIVER_VERSION "2019/5/10:tm2 verify two ip share pinmux" +#define CEC_DRIVER_VERSION "2019/6/13:early suspend not report pw status\n" #define CEC_FRAME_DELAY msecs_to_jiffies(400) #define CEC_DEV_NAME "cec"