hdmitx: correct hdmipwr uevent init state [3/4]
authorhang cheng <hang.cheng@amlogic.com>
Fri, 7 May 2021 09:09:13 +0000 (17:09 +0800)
committerChristian Hoffmann <chrmhoffmann@gmail.com>
Sun, 12 Feb 2023 08:13:12 +0000 (09:13 +0100)
PD#SWPL-49008

Problem:
hdmi early suspend uevent is not received by sysctl

Solution:
correct hdmipwr uevent init state

Verify:
AC214

Change-Id: I91f4e1643a58d54a8d0ca0f8cf50bd9ab6e1bd13
Signed-off-by: hang cheng <hang.cheng@amlogic.com>
drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c
include/linux/amlogic/media/vout/hdmi_tx/hdmi_tx_module.h

index 17f7ce3611d184952182155ffb22710ecfcb4d0b..343cfafb5ecbd0184a718e5b6ece908ad7ccc45d 100644 (file)
@@ -244,7 +244,8 @@ static void hdmitx_early_suspend(struct early_suspend *h)
        hdmitx_edid_clear(hdev);
        hdmitx_edid_ram_buffer_clear(hdev);
        edidinfo_detach_to_vinfo(hdev);
-       extcon_set_state_sync(hdmitx_extcon_power, EXTCON_DISP_HDMI, 0);
+       extcon_set_state_sync(hdmitx_extcon_power, EXTCON_DISP_HDMI,
+                             HDMI_SUSPEND);
        phdmi->hwop.cntlconfig(&hdmitx_device, CONF_CLR_AVI_PACKET, 0);
        phdmi->hwop.cntlconfig(&hdmitx_device, CONF_CLR_VSDB_PACKET, 0);
        /*close vpu clk*/
@@ -318,7 +319,8 @@ static void hdmitx_late_resume(struct early_suspend *h)
 
        extcon_set_state_sync(hdmitx_extcon_hdmi, EXTCON_DISP_HDMI,
                hdmitx_device.hpd_state);
-       extcon_set_state_sync(hdmitx_extcon_power, EXTCON_DISP_HDMI, 1);
+       extcon_set_state_sync(hdmitx_extcon_power, EXTCON_DISP_HDMI,
+                             HDMI_WAKEUP);
        extcon_set_state_sync(hdmitx_extcon_audio, EXTCON_DISP_HDMI,
                hdmitx_device.hpd_state);
 
@@ -5807,7 +5809,7 @@ static int hdmi_task_handle(void *data)
        hdmitx_notify_hpd(hdmitx_device->hpd_state);
 
        extcon_set_state_sync(hdmitx_extcon_power, EXTCON_DISP_HDMI,
-               hdmitx_device->hpd_state);
+                             HDMI_WAKEUP);
 
        INIT_WORK(&hdmitx_device->work_hdr, hdr_work_func);
        hdmitx_device->hdmi_wq = alloc_workqueue(DEVICE_NAME,
index 671c56a68b07e4e7bb5c5cf613ec86ce502f7295..344b16c948d8484d5d261ec56dece67a8b1d7db2 100644 (file)
@@ -775,6 +775,8 @@ extern int hdmitx_set_audio(struct hdmitx_dev *hdmitx_device,
 #define HDMITX_PLUG                    1
 #define HDMITX_UNPLUG                  2
 #define HDMITX_PHY_ADDR_VALID          3
+#define HDMI_SUSPEND   0
+#define HDMI_WAKEUP    1
 
 enum hdmitx_event {
        HDMITX_NONE_EVENT = 0,