18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci Conexant cx24123/cx24109 - DVB QPSK Satellite demod/tuner driver 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci Copyright (C) 2005 Steven Toth <stoth@linuxtv.org> 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci*/ 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#ifndef CX24123_H 108c2ecf20Sopenharmony_ci#define CX24123_H 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#include <linux/dvb/frontend.h> 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_cistruct cx24123_config { 158c2ecf20Sopenharmony_ci /* the demodulator's i2c address */ 168c2ecf20Sopenharmony_ci u8 demod_address; 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci /* Need to set device param for start_dma */ 198c2ecf20Sopenharmony_ci int (*set_ts_params)(struct dvb_frontend *fe, int is_punctured); 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci /* 0 = LNB voltage normal, 1 = LNB voltage inverted */ 228c2ecf20Sopenharmony_ci int lnb_polarity; 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci /* this device has another tuner */ 258c2ecf20Sopenharmony_ci u8 dont_use_pll; 268c2ecf20Sopenharmony_ci void (*agc_callback) (struct dvb_frontend *); 278c2ecf20Sopenharmony_ci}; 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci#if IS_REACHABLE(CONFIG_DVB_CX24123) 308c2ecf20Sopenharmony_ciextern struct dvb_frontend *cx24123_attach(const struct cx24123_config *config, 318c2ecf20Sopenharmony_ci struct i2c_adapter *i2c); 328c2ecf20Sopenharmony_ciextern struct i2c_adapter *cx24123_get_tuner_i2c_adapter(struct dvb_frontend *); 338c2ecf20Sopenharmony_ci#else 348c2ecf20Sopenharmony_cistatic inline struct dvb_frontend *cx24123_attach( 358c2ecf20Sopenharmony_ci const struct cx24123_config *config, struct i2c_adapter *i2c) 368c2ecf20Sopenharmony_ci{ 378c2ecf20Sopenharmony_ci printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 388c2ecf20Sopenharmony_ci return NULL; 398c2ecf20Sopenharmony_ci} 408c2ecf20Sopenharmony_cistatic inline struct i2c_adapter * 418c2ecf20Sopenharmony_ci cx24123_get_tuner_i2c_adapter(struct dvb_frontend *fe) 428c2ecf20Sopenharmony_ci{ 438c2ecf20Sopenharmony_ci printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 448c2ecf20Sopenharmony_ci return NULL; 458c2ecf20Sopenharmony_ci} 468c2ecf20Sopenharmony_ci#endif 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci#endif /* CX24123_H */ 49