Thomas Gleixner | c942fdd | 2019-05-27 08:55:06 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
David T.L. Wong | ec27b6a | 2009-10-26 07:08:17 -0300 | [diff] [blame] | 2 | /* |
| 3 | * Support for AltoBeam GB20600 (a.k.a DMB-TH) demodulator |
| 4 | * ATBM8830, ATBM8831 |
| 5 | * |
| 6 | * Copyright (C) 2009 David T.L. Wong <davidtlwong@gmail.com> |
David T.L. Wong | ec27b6a | 2009-10-26 07:08:17 -0300 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #ifndef __ATBM8830_H__ |
| 10 | #define __ATBM8830_H__ |
| 11 | |
| 12 | #include <linux/dvb/frontend.h> |
| 13 | #include <linux/i2c.h> |
| 14 | |
| 15 | #define ATBM8830_PROD_8830 0 |
| 16 | #define ATBM8830_PROD_8831 1 |
| 17 | |
| 18 | struct atbm8830_config { |
| 19 | |
| 20 | /* product type */ |
| 21 | u8 prod; |
| 22 | |
| 23 | /* the demodulator's i2c address */ |
| 24 | u8 demod_address; |
| 25 | |
| 26 | /* parallel or serial transport stream */ |
| 27 | u8 serial_ts; |
| 28 | |
Lucas De Marchi | 25985ed | 2011-03-30 22:57:33 -0300 | [diff] [blame] | 29 | /* transport stream clock output only when receiving valid stream */ |
David T.L. Wong | ec27b6a | 2009-10-26 07:08:17 -0300 | [diff] [blame] | 30 | u8 ts_clk_gated; |
| 31 | |
| 32 | /* Decoder sample TS data at rising edge of clock */ |
| 33 | u8 ts_sampling_edge; |
| 34 | |
| 35 | /* Oscillator clock frequency */ |
| 36 | u32 osc_clk_freq; /* in kHz */ |
| 37 | |
| 38 | /* IF frequency */ |
| 39 | u32 if_freq; /* in kHz */ |
| 40 | |
| 41 | /* Swap I/Q for zero IF */ |
| 42 | u8 zif_swap_iq; |
| 43 | |
| 44 | /* Tuner AGC settings */ |
| 45 | u8 agc_min; |
| 46 | u8 agc_max; |
| 47 | u8 agc_hold_loop; |
| 48 | }; |
| 49 | |
Arnd Bergmann | 9b17452 | 2015-02-18 14:12:42 -0300 | [diff] [blame] | 50 | #if IS_REACHABLE(CONFIG_DVB_ATBM8830) |
David T.L. Wong | ec27b6a | 2009-10-26 07:08:17 -0300 | [diff] [blame] | 51 | extern struct dvb_frontend *atbm8830_attach(const struct atbm8830_config *config, |
| 52 | struct i2c_adapter *i2c); |
| 53 | #else |
| 54 | static inline |
| 55 | struct dvb_frontend *atbm8830_attach(const struct atbm8830_config *config, |
| 56 | struct i2c_adapter *i2c) { |
| 57 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); |
| 58 | return NULL; |
| 59 | } |
| 60 | #endif /* CONFIG_DVB_ATBM8830 */ |
| 61 | |
| 62 | #endif /* __ATBM8830_H__ */ |