CEC: AOCEC libcec support

This commit is contained in:
Ray
2019-02-20 15:16:11 +01:00
parent ca7a857311
commit 7369d186e2
2 changed files with 10 additions and 6 deletions

View File

@@ -65,7 +65,7 @@ static struct early_suspend aocec_suspend_handler;
#define CEC_FRAME_DELAY msecs_to_jiffies(400)
#define CEC_DEV_NAME "cec"
#define CEC_DEV_NAME "aocec"
#define CEC_POWER_ON (0 << 0)
#define CEC_EARLY_SUSPEND (1 << 0)
@@ -1905,7 +1905,8 @@ static void cec_task(struct work_struct *work)
cec_cfg = cec_config(0, 0);
if (cec_cfg & CEC_FUNC_CFG_CEC_ON) {
/*cec module on*/
if (cec_dev && (!wake_ok || cec_service_suspended()))
if (cec_dev && (!wake_ok || cec_service_suspended())
&& !(cec_dev->hal_flag & (1 << HDMI_OPTION_SYSTEM_CEC_CONTROL)))
cec_rx_process();
/*for check rx buffer for old chip version, cec rx irq process*/
@@ -2530,6 +2531,11 @@ static ssize_t hdmitx_cec_write(struct file *f, const char __user *buf,
if (cec_cfg & CEC_FUNC_CFG_CEC_ON) {
/*cec module on*/
ret = cec_ll_tx(tempbuf, size);
if (ret == CEC_FAIL_NACK) {
return -1;
} else {
return size;
}
} else {
CEC_ERR("err:cec module disabled\n");
}
@@ -2906,9 +2912,7 @@ static char *aml_cec_class_devnode(struct device *dev, umode_t *mode)
{
if (mode) {
*mode = 0666;
CEC_INFO("mode is %x\n", *mode);
} else
CEC_INFO("mode is null\n");
}
return NULL;
}

View File

@@ -22,7 +22,7 @@
#define CEC_DRIVER_VERSION "Ver 2018/11/21\n"
#define CEC_FRAME_DELAY msecs_to_jiffies(400)
#define CEC_DEV_NAME "cec"
#define CEC_DEV_NAME "aocec"
#define CEC_EARLY_SUSPEND (1 << 0)
#define CEC_DEEP_SUSPEND (1 << 1)