diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /include/linux/n_r3964.h | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'include/linux/n_r3964.h')
-rw-r--r-- | include/linux/n_r3964.h | 56 |
1 files changed, 55 insertions, 1 deletions
diff --git a/include/linux/n_r3964.h b/include/linux/n_r3964.h index 5d0b2a1dee6..54b8e0d8d91 100644 --- a/include/linux/n_r3964.h +++ b/include/linux/n_r3964.h | |||
@@ -43,12 +43,15 @@ | |||
43 | * | 43 | * |
44 | * | 44 | * |
45 | */ | 45 | */ |
46 | |||
46 | #ifndef __LINUX_N_R3964_H__ | 47 | #ifndef __LINUX_N_R3964_H__ |
47 | #define __LINUX_N_R3964_H__ | 48 | #define __LINUX_N_R3964_H__ |
48 | 49 | ||
50 | /* line disciplines for r3964 protocol */ | ||
51 | |||
52 | #ifdef __KERNEL__ | ||
49 | 53 | ||
50 | #include <linux/param.h> | 54 | #include <linux/param.h> |
51 | #include <uapi/linux/n_r3964.h> | ||
52 | 55 | ||
53 | /* | 56 | /* |
54 | * Common ascii handshake characters: | 57 | * Common ascii handshake characters: |
@@ -70,6 +73,32 @@ | |||
70 | #define R3964_TO_RX_PANIC ((4000)*HZ/1000) | 73 | #define R3964_TO_RX_PANIC ((4000)*HZ/1000) |
71 | #define R3964_MAX_RETRIES 5 | 74 | #define R3964_MAX_RETRIES 5 |
72 | 75 | ||
76 | #endif | ||
77 | |||
78 | /* | ||
79 | * Ioctl-commands | ||
80 | */ | ||
81 | |||
82 | #define R3964_ENABLE_SIGNALS 0x5301 | ||
83 | #define R3964_SETPRIORITY 0x5302 | ||
84 | #define R3964_USE_BCC 0x5303 | ||
85 | #define R3964_READ_TELEGRAM 0x5304 | ||
86 | |||
87 | /* Options for R3964_SETPRIORITY */ | ||
88 | #define R3964_MASTER 0 | ||
89 | #define R3964_SLAVE 1 | ||
90 | |||
91 | /* Options for R3964_ENABLE_SIGNALS */ | ||
92 | #define R3964_SIG_ACK 0x0001 | ||
93 | #define R3964_SIG_DATA 0x0002 | ||
94 | #define R3964_SIG_ALL 0x000f | ||
95 | #define R3964_SIG_NONE 0x0000 | ||
96 | #define R3964_USE_SIGIO 0x1000 | ||
97 | |||
98 | /* | ||
99 | * r3964 operation states: | ||
100 | */ | ||
101 | #ifdef __KERNEL__ | ||
73 | 102 | ||
74 | enum { R3964_IDLE, | 103 | enum { R3964_IDLE, |
75 | R3964_TX_REQUEST, R3964_TRANSMITTING, | 104 | R3964_TX_REQUEST, R3964_TRANSMITTING, |
@@ -98,6 +127,29 @@ struct r3964_client_info { | |||
98 | }; | 127 | }; |
99 | 128 | ||
100 | 129 | ||
130 | #endif | ||
131 | |||
132 | /* types for msg_id: */ | ||
133 | enum {R3964_MSG_ACK=1, R3964_MSG_DATA }; | ||
134 | |||
135 | #define R3964_MAX_MSG_COUNT 32 | ||
136 | |||
137 | /* error codes for client messages */ | ||
138 | #define R3964_OK 0 /* no error. */ | ||
139 | #define R3964_TX_FAIL -1 /* transmission error, block NOT sent */ | ||
140 | #define R3964_OVERFLOW -2 /* msg queue overflow */ | ||
141 | |||
142 | /* the client gets this struct when calling read(fd,...): */ | ||
143 | struct r3964_client_message { | ||
144 | int msg_id; | ||
145 | int arg; | ||
146 | int error_code; | ||
147 | }; | ||
148 | |||
149 | #define R3964_MTU 256 | ||
150 | |||
151 | |||
152 | #ifdef __KERNEL__ | ||
101 | 153 | ||
102 | struct r3964_block_header; | 154 | struct r3964_block_header; |
103 | 155 | ||
@@ -174,4 +226,6 @@ struct r3964_info { | |||
174 | int nRetry; | 226 | int nRetry; |
175 | }; | 227 | }; |
176 | 228 | ||
229 | #endif | ||
230 | |||
177 | #endif | 231 | #endif |