mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
CEC: AOCEC libcec support
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user