1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Support for LG2160 - ATSC/MH
5 * Copyright (C) 2010 Michael Krufky <mkrufky@linuxtv.org>
11 #include <linux/i2c.h>
12 #include <media/dvb_frontend.h>
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,
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,
38 struct lg2160_config
{
41 /* user defined IF frequency in 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)
57 struct dvb_frontend
*lg2160_attach(const struct lg2160_config
*config
,
58 struct i2c_adapter
*i2c_adap
);
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__
);
67 #endif /* CONFIG_DVB_LG2160 */
69 #endif /* _LG2160_H_ */