Merge tag 'io_uring-5.11-2021-01-16' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / media / dvb-frontends / lg2160.h
blob17ddf68226546ccf365e11b23042cbc8269d4ec0
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 * Support for LG2160 - ATSC/MH
5 * Copyright (C) 2010 Michael Krufky <mkrufky@linuxtv.org>
6 */
8 #ifndef _LG2160_H_
9 #define _LG2160_H_
11 #include <linux/i2c.h>
12 #include <media/dvb_frontend.h>
14 enum lg_chip_type {
15 LG2160 = 0,
16 LG2161 = 1,
19 #define LG2161_1019 LG2161
20 #define LG2161_1040 LG2161
22 enum lg2160_spi_clock {
23 LG2160_SPI_3_125_MHZ = 0,
24 LG2160_SPI_6_25_MHZ = 1,
25 LG2160_SPI_12_5_MHZ = 2,
28 #if 0
29 enum lg2161_oif {
30 LG2161_OIF_EBI2_SLA = 1,
31 LG2161_OIF_SDIO_SLA = 2,
32 LG2161_OIF_SPI_SLA = 3,
33 LG2161_OIF_SPI_MAS = 4,
34 LG2161_OIF_SERIAL_TS = 7,
36 #endif
38 struct lg2160_config {
39 u8 i2c_addr;
41 /* user defined IF frequency in KHz */
42 u16 if_khz;
44 /* disable i2c repeater - 0:repeater enabled 1:repeater disabled */
45 unsigned int deny_i2c_rptr:1;
47 /* spectral inversion - 0:disabled 1:enabled */
48 unsigned int spectral_inversion:1;
50 unsigned int output_if;
51 enum lg2160_spi_clock spi_clock;
52 enum lg_chip_type lg_chip;
55 #if IS_REACHABLE(CONFIG_DVB_LG2160)
56 extern
57 struct dvb_frontend *lg2160_attach(const struct lg2160_config *config,
58 struct i2c_adapter *i2c_adap);
59 #else
60 static inline
61 struct dvb_frontend *lg2160_attach(const struct lg2160_config *config,
62 struct i2c_adapter *i2c_adap)
64 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
65 return NULL;
67 #endif /* CONFIG_DVB_LG2160 */
69 #endif /* _LG2160_H_ */