Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3115)

Unified Diff: drivers/media/video/samsung/tv20/cec.h

Issue 2036011: V4L/DVB : Add S5PV210 TV out driver support (Closed) Base URL: swsolcc@12.23.106.100:kernel-samsung.git
Patch Set: Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « drivers/media/video/samsung/tv20/Makefile ('k') | drivers/media/video/samsung/tv20/cec.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: drivers/media/video/samsung/tv20/cec.h
diff --git a/drivers/media/video/samsung/tv20/cec.h b/drivers/media/video/samsung/tv20/cec.h
new file mode 100644
index 0000000000000000000000000000000000000000..4aaff10d485b3c99dc42b9caac9430508093b073
--- /dev/null
+++ b/drivers/media/video/samsung/tv20/cec.h
@@ -0,0 +1,102 @@
+/* linux/drivers/media/video/samsung/tv20/cec.h
+*
+* Copyright (c) 2010 Samsung Electronics Co., Ltd.
+* http://www.samsung.com/
+*
+* S5PV210 - cec interface header for Samsung TVOut driver
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License version 2 as
+* published by the Free Software Foundation.
+*/
+
+/* #define CECDEBUG 1 */
+
+#include <linux/platform_device.h>
+
+#define VERSION "1.0" /* Driver version number */
+#define CEC_MINOR 242 /* Major 10, Minor 242, /dev/cec */
+
+#define CEC_MESSAGE_BROADCAST_MASK 0x0F
+#define CEC_MESSAGE_BROADCAST 0x0F
+
+#define CEC_FILTER_THRESHOLD 0x15
+
+/*
+* @enum cec_state
+* Defines all possible states of CEC software state machine
+*/
+enum cec_state {
+ STATE_RX,
+ STATE_TX,
+ STATE_DONE,
+ STATE_ERROR
+};
+
+/*
+* @struct cec_rx_struct
+* Holds CEC Rx state and data
+*/
+
+struct cec_rx_struct {
+ spinlock_t lock;
+ wait_queue_head_t waitq;
+ atomic_t state;
+ u8 *buffer;
+ unsigned int size;
+};
+
+/*
+* @struct cec_tx_struct
+* Holds CEC Tx state and data
+*/
+
+struct cec_tx_struct {
+ wait_queue_head_t waitq;
+ atomic_t state;
+};
+
+#define CEC_STATUS_TX_RUNNING (1<<0)
+#define CEC_STATUS_TX_TRANSFERRING (1<<1)
+#define CEC_STATUS_TX_DONE (1<<2)
+#define CEC_STATUS_TX_ERROR (1<<3)
+#define CEC_STATUS_TX_BYTES (0xFF<<8)
+#define CEC_STATUS_RX_RUNNING (1<<16)
+#define CEC_STATUS_RX_RECEIVING (1<<17)
+#define CEC_STATUS_RX_DONE (1<<18)
+#define CEC_STATUS_RX_ERROR (1<<19)
+#define CEC_STATUS_RX_BCAST (1<<20)
+#define CEC_STATUS_RX_BYTES (0xFF<<24)
+
+#define CEC_IOC_MAGIC 'c'
+
+/*
+* CEC device request code to set logical address.
+*/
+#define CEC_IOC_SETLADDR _IOW(CEC_IOC_MAGIC, 0, unsigned int)
+
+/* CEC Rx buffer size */
+#define CEC_RX_BUFF_SIZE 16
+/* CEC Tx buffer size */
+#define CEC_TX_BUFF_SIZE 16
+
+extern void tv_cec_set_divider(void);
+extern void tv_cec_enable_rx(void);
+extern void tv_cec_mask_rx_interrupts(void);
+extern void tv_cec_unmask_rx_interrupts(void);
+extern void tv_cec_mask_tx_interrupts(void);
+extern void tv_cec_unmask_tx_interrupts(void);
+extern void tv_cec_set_tx_state(enum cec_state state);
+extern void tv_cec_set_rx_state(enum cec_state state);
+extern void tv_cec_reset(void);
+extern void tv_cec_tx_reset(void);
+extern void tv_cec_rx_reset(void);
+extern void tv_cec_threshold(void);
+extern void tv_cec_copy_packet(char *data, size_t count);
+extern void tv_cec_set_addr(u32 addr);
+extern u32 tv_cec_get_status(void);
+extern void tv_clr_pending_tx(void);
+extern void tv_clr_pending_rx(void);
+extern void tv_cec_get_rx_buf(u32 size, u8 *buffer);
+extern void __init tv_cec_probe(struct platform_device *pdev);
+
« no previous file with comments | « drivers/media/video/samsung/tv20/Makefile ('k') | drivers/media/video/samsung/tv20/cec.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698