18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Support for NXT2002 and NXT2004 - VSB/QAM 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (C) 2005 Kirk Lapray (kirk.lapray@gmail.com) 68c2ecf20Sopenharmony_ci * based on nxt2002 by Taylor Jacob <rtjacob@earthlink.net> 78c2ecf20Sopenharmony_ci * and nxt2004 by Jean-Francois Thibert (jeanfrancois@sagetv.com) 88c2ecf20Sopenharmony_ci*/ 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#ifndef NXT200X_H 118c2ecf20Sopenharmony_ci#define NXT200X_H 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci#include <linux/dvb/frontend.h> 148c2ecf20Sopenharmony_ci#include <linux/firmware.h> 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_citypedef enum nxt_chip_t { 178c2ecf20Sopenharmony_ci NXTUNDEFINED, 188c2ecf20Sopenharmony_ci NXT2002, 198c2ecf20Sopenharmony_ci NXT2004 208c2ecf20Sopenharmony_ci}nxt_chip_type; 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_cistruct nxt200x_config 238c2ecf20Sopenharmony_ci{ 248c2ecf20Sopenharmony_ci /* the demodulator's i2c address */ 258c2ecf20Sopenharmony_ci u8 demod_address; 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci /* need to set device param for start_dma */ 288c2ecf20Sopenharmony_ci int (*set_ts_params)(struct dvb_frontend* fe, int is_punctured); 298c2ecf20Sopenharmony_ci}; 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci#if IS_REACHABLE(CONFIG_DVB_NXT200X) 328c2ecf20Sopenharmony_ciextern struct dvb_frontend* nxt200x_attach(const struct nxt200x_config* config, 338c2ecf20Sopenharmony_ci struct i2c_adapter* i2c); 348c2ecf20Sopenharmony_ci#else 358c2ecf20Sopenharmony_cistatic inline struct dvb_frontend* nxt200x_attach(const struct nxt200x_config* config, 368c2ecf20Sopenharmony_ci struct i2c_adapter* i2c) 378c2ecf20Sopenharmony_ci{ 388c2ecf20Sopenharmony_ci printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 398c2ecf20Sopenharmony_ci return NULL; 408c2ecf20Sopenharmony_ci} 418c2ecf20Sopenharmony_ci#endif // CONFIG_DVB_NXT200X 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci#endif /* NXT200X_H */ 44