cec: Init cec function from register [1/1]

PD#SWPL-69530

Problem:
wakeup logic don't follow UI cec on/off

Solution:
Init cec function from register

Verify:
T982

Change-Id: Ia4ec3a52ad29554b689379b06e58bd2a693aef85
Signed-off-by: bowen cheng <bowen.cheng@amlogic.com>
This commit is contained in:
bowen cheng
2023-11-17 15:26:28 +08:00
committed by gerrit autosubmit
parent c52457801a
commit 83f73696ce
2 changed files with 14 additions and 3 deletions
+13 -2
View File
@@ -2470,6 +2470,17 @@ static void cec_rx_uevent_handler(struct work_struct *work)
cec_set_uevent(CEC_RX_MSG, 0);
}
static void cec_func_init(unsigned int cec_func_config)
{
unsigned int cec_func = CEC_FUNC_CFG_ALL;
if (!(cec_func_config & CEC_FUNC_CFG_CEC_ON))
cec_func &= ~(CEC_FUNC_CFG_CEC_ON);
if (!(cec_func_config & CEC_FUNC_CFG_AUTO_POWER_ON))
cec_func &= ~(CEC_FUNC_CFG_AUTO_POWER_ON);
cec_config(cec_func, 1);
}
static int aml_cec_probe(struct platform_device *pdev)
{
struct device *cdev;
@@ -2796,8 +2807,8 @@ static int aml_cec_probe(struct platform_device *pdev)
cec_set_clk(&pdev->dev);
/* irq set */
cec_irq_enable(false);
/* default enable all function*/
cec_config(CEC_FUNC_CFG_ALL, 1);
/* Init cec function from register*/
cec_func_init(cec_config(0, 0));
/* for init */
cec_pre_init();
+1 -1
View File
@@ -9,7 +9,7 @@
#include <linux/clk.h>
#include "hdmi_tx_cec_20.h"
#define CEC_DRIVER_VERSION "2023/10/18: Handle mailbox wakeup data by thread"
#define CEC_DRIVER_VERSION "2023/11/17: Init cec function from register"
#define CEC_DEV_NAME "cec"