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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /* linux/drivers/media/video/samsung/tv20/cec.h
2 *
3 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com/
5 *
6 * S5PV210 - cec interface header for Samsung TVOut driver
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13 /* #define CECDEBUG 1 */
14
15 #include <linux/platform_device.h>
16
17 #define VERSION "1.0" /* Driver version number */
18 #define CEC_MINOR 242 /* Major 10, Minor 242, /dev/cec */
19
20 #define CEC_MESSAGE_BROADCAST_MASK 0x0F
21 #define CEC_MESSAGE_BROADCAST 0x0F
22
23 #define CEC_FILTER_THRESHOLD 0x15
24
25 /*
26 * @enum cec_state
27 * Defines all possible states of CEC software state machine
28 */
29 enum cec_state {
30 STATE_RX,
31 STATE_TX,
32 STATE_DONE,
33 STATE_ERROR
34 };
35
36 /*
37 * @struct cec_rx_struct
38 * Holds CEC Rx state and data
39 */
40
41 struct cec_rx_struct {
42 spinlock_t lock;
43 wait_queue_head_t waitq;
44 atomic_t state;
45 u8 *buffer;
46 unsigned int size;
47 };
48
49 /*
50 * @struct cec_tx_struct
51 * Holds CEC Tx state and data
52 */
53
54 struct cec_tx_struct {
55 wait_queue_head_t waitq;
56 atomic_t state;
57 };
58
59 #define CEC_STATUS_TX_RUNNING (1<<0)
60 #define CEC_STATUS_TX_TRANSFERRING (1<<1)
61 #define CEC_STATUS_TX_DONE (1<<2)
62 #define CEC_STATUS_TX_ERROR (1<<3)
63 #define CEC_STATUS_TX_BYTES (0xFF<<8)
64 #define CEC_STATUS_RX_RUNNING (1<<16)
65 #define CEC_STATUS_RX_RECEIVING (1<<17)
66 #define CEC_STATUS_RX_DONE (1<<18)
67 #define CEC_STATUS_RX_ERROR (1<<19)
68 #define CEC_STATUS_RX_BCAST (1<<20)
69 #define CEC_STATUS_RX_BYTES (0xFF<<24)
70
71 #define CEC_IOC_MAGIC 'c'
72
73 /*
74 * CEC device request code to set logical address.
75 */
76 #define CEC_IOC_SETLADDR _IOW(CEC_IOC_MAGIC, 0, unsigned int)
77
78 /* CEC Rx buffer size */
79 #define CEC_RX_BUFF_SIZE 16
80 /* CEC Tx buffer size */
81 #define CEC_TX_BUFF_SIZE 16
82
83 extern void tv_cec_set_divider(void);
84 extern void tv_cec_enable_rx(void);
85 extern void tv_cec_mask_rx_interrupts(void);
86 extern void tv_cec_unmask_rx_interrupts(void);
87 extern void tv_cec_mask_tx_interrupts(void);
88 extern void tv_cec_unmask_tx_interrupts(void);
89 extern void tv_cec_set_tx_state(enum cec_state state);
90 extern void tv_cec_set_rx_state(enum cec_state state);
91 extern void tv_cec_reset(void);
92 extern void tv_cec_tx_reset(void);
93 extern void tv_cec_rx_reset(void);
94 extern void tv_cec_threshold(void);
95 extern void tv_cec_copy_packet(char *data, size_t count);
96 extern void tv_cec_set_addr(u32 addr);
97 extern u32 tv_cec_get_status(void);
98 extern void tv_clr_pending_tx(void);
99 extern void tv_clr_pending_rx(void);
100 extern void tv_cec_get_rx_buf(u32 size, u8 *buffer);
101 extern void __init tv_cec_probe(struct platform_device *pdev);
102
OLDNEW
« 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