Go to the documentation of this file.
23 #define ITE_DRIVER_NAME "ite-cir"
26 #define ite_pr(level, text, ...) \
27 printk(level KBUILD_MODNAME ": " text, ## __VA_ARGS__)
28 #define ite_dbg(text, ...) do { \
31 KBUILD_MODNAME ": " text "\n" , ## __VA_ARGS__); \
34 #define ite_dbg_verbose(text, ...) do {\
37 KBUILD_MODNAME ": " text "\n" , ## __VA_ARGS__); \
41 #define ITE_TX_FIFO_LEN 32
42 #define ITE_RX_FIFO_LEN 32
45 #define ITE_IRQ_TX_FIFO 1
46 #define ITE_IRQ_RX_FIFO 2
47 #define ITE_IRQ_RX_FIFO_OVERRUN 4
120 bool use_demodulator,
u8 carrier_freq_bits,
121 u8 allowance_bits,
u8 pulse_width_bits);
149 #define ITE_BAUDRATE_DIVISOR 1
152 #define ITE_LCF_MIN_CARRIER_FREQ 27000
153 #define ITE_LCF_MAX_CARRIER_FREQ 58000
156 #define ITE_HCF_MIN_CARRIER_FREQ 400000
157 #define ITE_HCF_MAX_CARRIER_FREQ 500000
160 #define ITE_DEFAULT_CARRIER_FREQ 38000
163 #define ITE_IDLE_TIMEOUT 200000000UL
166 #define ITE_MIN_IDLE_TIMEOUT 100000000UL
167 #define ITE_MAX_IDLE_TIMEOUT 1000000000UL
170 #define ITE_BITS_TO_NS(bits, sample_period) \
171 ((u32) ((bits) * ITE_BAUDRATE_DIVISOR * sample_period))
183 #define ITE_RXDCR_PER_10000_STEP 625
186 #define ITE_CFQ_400 0x03
187 #define ITE_CFQ_450 0x08
188 #define ITE_CFQ_480 0x0b
189 #define ITE_CFQ_500 0x0d
192 #define ITE_TXMPW_A 0x02
193 #define ITE_TXMPW_B 0x03
194 #define ITE_TXMPW_C 0x04
195 #define ITE_TXMPW_D 0x05
196 #define ITE_TXMPW_E 0x06
199 #define ITE_RXDCR_DEFAULT 0x01
200 #define ITE_RXDCR_MAX 0x07
203 #define ITE_TX_PULSE 0x00
204 #define ITE_TX_SPACE 0x80
205 #define ITE_TX_MAX_RLE 0x80
206 #define ITE_TX_RLE_MASK 0x7f
221 #define IT87_IER 0x01
222 #define IT87_RCR 0x02
223 #define IT87_TCR1 0x03
224 #define IT87_TCR2 0x04
225 #define IT87_TSR 0x05
226 #define IT87_RSR 0x06
227 #define IT87_BDLR 0x05
228 #define IT87_BDHR 0x06
229 #define IT87_IIR 0x07
231 #define IT87_IOREG_LENGTH 0x08
234 #define IT87_TLDLIE 0x01
235 #define IT87_RDAIE 0x02
236 #define IT87_RFOIE 0x04
237 #define IT87_IEC 0x08
239 #define IT87_RESET 0x20
242 #define IT87_RXDCR 0x07
243 #define IT87_RXACT 0x08
244 #define IT87_RXEND 0x10
245 #define IT87_RXEN 0x20
246 #define IT87_HCFS 0x40
247 #define IT87_RDWOS 0x80
250 #define IT87_TXMPM 0x03
251 #define IT87_TXMPM_DEFAULT 0x00
252 #define IT87_TXENDF 0x04
253 #define IT87_TXRLE 0x08
254 #define IT87_FIFOTL 0x30
255 #define IT87_FIFOTL_DEFAULT 0x20
258 #define IT87_ILE 0x40
259 #define IT87_FIFOCLR 0x80
262 #define IT87_TXMPW 0x07
263 #define IT87_TXMPW_DEFAULT 0x04
264 #define IT87_CFQ 0xf8
265 #define IT87_CFQ_SHIFT 3
268 #define IT87_TXFBC 0x3f
271 #define IT87_RXFBC 0x3f
272 #define IT87_RXFTO 0x80
277 #define IT87_II_NOINT 0x00
278 #define IT87_II_TXLDL 0x02
279 #define IT87_II_RXDS 0x04
280 #define IT87_II_RXFO 0x06
301 #define IT85_C0DR 0x00
302 #define IT85_C0MSTCR 0x01
303 #define IT85_C0IER 0x02
304 #define IT85_C0IIR 0x03
305 #define IT85_C0CFR 0x04
306 #define IT85_C0RCR 0x05
307 #define IT85_C0TCR 0x06
308 #define IT85_C0SCK 0x07
309 #define IT85_C0BDLR 0x08
310 #define IT85_C0BDHR 0x09
311 #define IT85_C0TFSR 0x0a
312 #define IT85_C0RFSR 0x0b
313 #define IT85_C0WCL 0x0d
314 #define IT85_C0WCR 0x0e
315 #define IT85_C0WPS 0x0f
317 #define IT85_IOREG_LENGTH 0x10
320 #define IT85_RESET 0x01
321 #define IT85_FIFOCLR 0x02
322 #define IT85_FIFOTL 0x0c
323 #define IT85_FIFOTL_DEFAULT 0x08
326 #define IT85_ILE 0x10
327 #define IT85_ILSEL 0x20
330 #define IT85_TLDLIE 0x01
331 #define IT85_RDAIE 0x02
332 #define IT85_RFOIE 0x04
333 #define IT85_IEC 0x80
336 #define IT85_TLDLI 0x01
337 #define IT85_RDAI 0x02
338 #define IT85_RFOI 0x04
339 #define IT85_NIP 0x80
342 #define IT85_CFQ 0x1f
343 #define IT85_HCFS 0x20
346 #define IT85_RXDCR 0x07
347 #define IT85_RXACT 0x08
348 #define IT85_RXEND 0x10
349 #define IT85_RDWOS 0x20
350 #define IT85_RXEN 0x80
353 #define IT85_TXMPW 0x07
354 #define IT85_TXMPW_DEFAULT 0x04
355 #define IT85_TXMPM 0x18
356 #define IT85_TXMPM_DEFAULT 0x00
357 #define IT85_TXENDF 0x20
358 #define IT85_TXRLE 0x40
361 #define IT85_SCKS 0x01
362 #define IT85_TXDCKG 0x02
363 #define IT85_DLL1P8E 0x04
364 #define IT85_DLLTE 0x08
365 #define IT85_BRCM 0x70
366 #define IT85_DLLOCK 0x80
369 #define IT85_TXFBC 0x3f
372 #define IT85_RXFBC 0x3f
373 #define IT85_RXFTO 0x80
376 #define IT85_WCL 0x3f
379 #define IT85_CIRPOSIE 0x01
380 #define IT85_CIRPOIS 0x02
381 #define IT85_CIRPOII 0x04
382 #define IT85_RCRST 0x10
383 #define IT85_WCRST 0x20
404 #define IT8708_BANKSEL 0x07
405 #define IT8708_HRAE 0x80
408 #define IT8708_C0DR 0x00
409 #define IT8708_C0MSTCR 0x01
410 #define IT8708_C0IER 0x02
411 #define IT8708_C0IIR 0x03
412 #define IT8708_C0RFSR 0x04
413 #define IT8708_C0RCR 0x05
414 #define IT8708_C0TFSR 0x06
415 #define IT8708_C0TCR 0x07
418 #define IT8708_C0BDLR 0x01
419 #define IT8708_C0BDHR 0x02
420 #define IT8708_C0CFR 0x04
425 #define IT8708_C0SCK 0x03
426 #define IT8708_C0WCL 0x05
427 #define IT8708_C0WCR 0x06
428 #define IT8708_C0WPS 0x07
430 #define IT8708_IOREG_LENGTH 0x08
435 #define IT8708_CSCRR 0x00
436 #define IT8708_CGPINTR 0x01
439 #define IT8708_CSCRR_SCRB 0x3f
440 #define IT8708_CSCRR_PM 0x80
443 #define IT8708_CGPINT 0x01
468 #define IT8709_RAM_IDX 0x00
469 #define IT8709_RAM_VAL 0x01
471 #define IT8709_IOREG_LENGTH 0x02
474 #define IT8709_MODE 0x1a
475 #define IT8709_REG_IDX 0x1b
476 #define IT8709_REG_VAL 0x1c
477 #define IT8709_IIR 0x1e
478 #define IT8709_RFSR 0x1f
479 #define IT8709_FIFO 0x20
482 #define IT8709_IDLE 0x00
483 #define IT8709_WRITE 0x01
484 #define IT8709_READ 0x02