1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /* drivers/media/platform/s5p-cec/s5p_cec.h
4 * Samsung S5P HDMI CEC driver
6 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
10 #define _S5P_CEC_H_ __FILE__
12 #include <linux/clk.h>
13 #include <linux/interrupt.h>
14 #include <linux/kernel.h>
15 #include <linux/mfd/syscon.h>
16 #include <linux/module.h>
18 #include <linux/platform_device.h>
19 #include <linux/pm_runtime.h>
20 #include <linux/timer.h>
21 #include <linux/workqueue.h>
22 #include <media/cec.h>
24 #include "exynos_hdmi_cec.h"
28 #define CEC_NAME "s5p-cec"
30 #define CEC_STATUS_TX_RUNNING (1 << 0)
31 #define CEC_STATUS_TX_TRANSFERRING (1 << 1)
32 #define CEC_STATUS_TX_DONE (1 << 2)
33 #define CEC_STATUS_TX_ERROR (1 << 3)
34 #define CEC_STATUS_TX_NACK (1 << 4)
35 #define CEC_STATUS_TX_BYTES (0xFF << 8)
36 #define CEC_STATUS_RX_RUNNING (1 << 16)
37 #define CEC_STATUS_RX_RECEIVING (1 << 17)
38 #define CEC_STATUS_RX_DONE (1 << 18)
39 #define CEC_STATUS_RX_ERROR (1 << 19)
40 #define CEC_STATUS_RX_BCAST (1 << 20)
41 #define CEC_STATUS_RX_BYTES (0xFF << 24)
43 #define CEC_WORKER_TX_DONE (1 << 0)
44 #define CEC_WORKER_RX_MSG (1 << 1)
46 /* CEC Rx buffer size */
47 #define CEC_RX_BUFF_SIZE 16
48 /* CEC Tx buffer size */
49 #define CEC_TX_BUFF_SIZE 16
62 struct cec_adapter
*adap
;
67 struct cec_notifier
*notifier
;
76 #endif /* _S5P_CEC_H_ */