ARC: thp: unbork !CONFIG_TRANSPARENT_HUGEPAGE build
[linux/fpc-iii.git] / drivers / media / dvb-frontends / si2165.h
blob8a15d6a9c552597914f9615d26259bcd00f8f514
1 /*
2 Driver for Silicon Labs SI2165 DVB-C/-T Demodulator
4 Copyright (C) 2013-2014 Matthias Schwarzott <zzam@gentoo.org>
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 References:
17 http://www.silabs.com/Support%20Documents/TechnicalDocs/Si2165-short.pdf
20 #ifndef _DVB_SI2165_H
21 #define _DVB_SI2165_H
23 #include <linux/dvb/frontend.h>
25 enum {
26 SI2165_MODE_OFF = 0x00,
27 SI2165_MODE_PLL_EXT = 0x20,
28 SI2165_MODE_PLL_XTAL = 0x21
31 struct si2165_config {
32 /* i2c addr
33 * possible values: 0x64,0x65,0x66,0x67 */
34 u8 i2c_addr;
36 /* external clock or XTAL */
37 u8 chip_mode;
39 /* frequency of external clock or xtal in Hz
40 * possible values: 4000000, 16000000, 20000000, 240000000, 27000000
42 u32 ref_freq_Hz;
44 /* invert the spectrum */
45 bool inversion;
48 #if IS_REACHABLE(CONFIG_DVB_SI2165)
49 struct dvb_frontend *si2165_attach(
50 const struct si2165_config *config,
51 struct i2c_adapter *i2c);
52 #else
53 static inline struct dvb_frontend *si2165_attach(
54 const struct si2165_config *config,
55 struct i2c_adapter *i2c)
57 pr_warn("%s: driver disabled by Kconfig\n", __func__);
58 return NULL;
60 #endif /* CONFIG_DVB_SI2165 */
62 #endif /* _DVB_SI2165_H */