^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) * Support for NXT2002 and NXT2004 - VSB/QAM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * Copyright (C) 2005 Kirk Lapray (kirk.lapray@gmail.com)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) * based on nxt2002 by Taylor Jacob <rtjacob@earthlink.net>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) * and nxt2004 by Jean-Francois Thibert (jeanfrancois@sagetv.com)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #ifndef NXT200X_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #define NXT200X_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #include <linux/dvb/frontend.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #include <linux/firmware.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) typedef enum nxt_chip_t {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) NXTUNDEFINED,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) NXT2002,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) NXT2004
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) }nxt_chip_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) struct nxt200x_config
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) /* the demodulator's i2c address */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) u8 demod_address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) /* need to set device param for start_dma */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) int (*set_ts_params)(struct dvb_frontend* fe, int is_punctured);
^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_NXT200X)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) extern struct dvb_frontend* nxt200x_attach(const struct nxt200x_config* config,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) struct i2c_adapter* i2c);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) static inline struct dvb_frontend* nxt200x_attach(const struct nxt200x_config* config,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) struct i2c_adapter* i2c)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) return NULL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) #endif // CONFIG_DVB_NXT200X
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) #endif /* NXT200X_H */