diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-04-21 05:12:35 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-04-21 05:12:35 -0400 |
commit | 676ee36be04985062522804c2de04f0764212be6 (patch) | |
tree | 781df135c5a91a04decad1b7d53b5a925dc11522 /drivers/media/dvb-frontends/lgdt3306a.h | |
parent | b18042a673e88c9457a6d1716219c2367ca447b0 (diff) | |
parent | e183201b9e917daf2530b637b2f34f1d5afb934d (diff) |
Merge branch 'patchwork' into v4l_for_linus
* patchwork: (404 commits)
[media] uvcvideo: add support for VIDIOC_QUERY_EXT_CTRL
[media] uvcvideo: fix cropcap v4l2-compliance failure
[media] media: omap3isp: remove unused clkdev
[media] coda: Add tracing support
[media] coda: drop dma_sync_single_for_device in coda_bitstream_queue
[media] coda: fix fill bitstream errors in nonstreaming case
[media] coda: call SEQ_END when the first queue is stopped
[media] coda: fail to start streaming if userspace set invalid formats
[media] coda: remove duplicate error messages for buffer allocations
[media] coda: move parameter buffer in together with context buffer allocation
[media] coda: allocate bitstream buffer from REQBUFS, size depends on the format
[media] coda: allocate per-context buffers from REQBUFS
[media] coda: use strlcpy instead of snprintf
[media] coda: bitstream payload is unsigned
[media] coda: fix double call to debugfs_remove
[media] coda: check kasprintf return value in coda_open
[media] coda: bitrate can only be set in kbps steps
[media] v4l2-mem2mem: no need to initialize b in v4l2_m2m_next_buf and v4l2_m2m_buf_remove
[media] s5p-mfc: set allow_zero_bytesused flag for vb2_queue_init
[media] coda: set allow_zero_bytesused flag for vb2_queue_init
...
Diffstat (limited to 'drivers/media/dvb-frontends/lgdt3306a.h')
-rw-r--r-- | drivers/media/dvb-frontends/lgdt3306a.h | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/drivers/media/dvb-frontends/lgdt3306a.h b/drivers/media/dvb-frontends/lgdt3306a.h new file mode 100644 index 000000000000..9dbb2dced1fe --- /dev/null +++ b/drivers/media/dvb-frontends/lgdt3306a.h | |||
@@ -0,0 +1,74 @@ | |||
1 | /* | ||
2 | * Support for LGDT3306A - 8VSB/QAM-B | ||
3 | * | ||
4 | * Copyright (C) 2013,2014 Fred Richter <frichter@hauppauge.com> | ||
5 | * based on lgdt3305.[ch] by Michael Krufky | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef _LGDT3306A_H_ | ||
19 | #define _LGDT3306A_H_ | ||
20 | |||
21 | #include <linux/i2c.h> | ||
22 | #include "dvb_frontend.h" | ||
23 | |||
24 | |||
25 | enum lgdt3306a_mpeg_mode { | ||
26 | LGDT3306A_MPEG_PARALLEL = 0, | ||
27 | LGDT3306A_MPEG_SERIAL = 1, | ||
28 | }; | ||
29 | |||
30 | enum lgdt3306a_tp_clock_edge { | ||
31 | LGDT3306A_TPCLK_RISING_EDGE = 0, | ||
32 | LGDT3306A_TPCLK_FALLING_EDGE = 1, | ||
33 | }; | ||
34 | |||
35 | enum lgdt3306a_tp_valid_polarity { | ||
36 | LGDT3306A_TP_VALID_LOW = 0, | ||
37 | LGDT3306A_TP_VALID_HIGH = 1, | ||
38 | }; | ||
39 | |||
40 | struct lgdt3306a_config { | ||
41 | u8 i2c_addr; | ||
42 | |||
43 | /* user defined IF frequency in KHz */ | ||
44 | u16 qam_if_khz; | ||
45 | u16 vsb_if_khz; | ||
46 | |||
47 | /* disable i2c repeater - 0:repeater enabled 1:repeater disabled */ | ||
48 | unsigned int deny_i2c_rptr:1; | ||
49 | |||
50 | /* spectral inversion - 0:disabled 1:enabled */ | ||
51 | unsigned int spectral_inversion:1; | ||
52 | |||
53 | enum lgdt3306a_mpeg_mode mpeg_mode; | ||
54 | enum lgdt3306a_tp_clock_edge tpclk_edge; | ||
55 | enum lgdt3306a_tp_valid_polarity tpvalid_polarity; | ||
56 | |||
57 | /* demod clock freq in MHz; 24 or 25 supported */ | ||
58 | int xtalMHz; | ||
59 | }; | ||
60 | |||
61 | #if IS_REACHABLE(CONFIG_DVB_LGDT3306A) | ||
62 | struct dvb_frontend *lgdt3306a_attach(const struct lgdt3306a_config *config, | ||
63 | struct i2c_adapter *i2c_adap); | ||
64 | #else | ||
65 | static inline | ||
66 | struct dvb_frontend *lgdt3306a_attach(const struct lgdt3306a_config *config, | ||
67 | struct i2c_adapter *i2c_adap) | ||
68 | { | ||
69 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); | ||
70 | return NULL; | ||
71 | } | ||
72 | #endif /* CONFIG_DVB_LGDT3306A */ | ||
73 | |||
74 | #endif /* _LGDT3306A_H_ */ | ||