^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0-or-later */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) Conexant cx24116/cx24118 - DVBS/S2 Satellite demod/tuner driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) Copyright (C) 2006 Steven Toth <stoth@linuxtv.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #ifndef CX24116_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #define CX24116_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #include <linux/dvb/frontend.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) struct cx24116_config {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) /* the demodulator's i2c address */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) u8 demod_address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) /* Need to set device param for start_dma */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) int (*set_ts_params)(struct dvb_frontend *fe, int is_punctured);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) /* Need to reset device during firmware loading */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) int (*reset_device)(struct dvb_frontend *fe);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) /* Need to set MPEG parameters */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) u8 mpg_clk_pos_pol:0x02;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) /* max bytes I2C provider can write at once */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) u16 i2c_wr_max;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) #if IS_REACHABLE(CONFIG_DVB_CX24116)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) extern struct dvb_frontend *cx24116_attach(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) const struct cx24116_config *config,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) struct i2c_adapter *i2c);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) static inline struct dvb_frontend *cx24116_attach(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) const struct cx24116_config *config,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) struct i2c_adapter *i2c)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) return NULL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) #endif /* CX24116_H */