18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci Conexant cx24116/cx24118 - DVBS/S2 Satellite demod/tuner driver 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci Copyright (C) 2006 Steven Toth <stoth@linuxtv.com> 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci*/ 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#ifndef CX24116_H 108c2ecf20Sopenharmony_ci#define CX24116_H 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#include <linux/dvb/frontend.h> 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_cistruct cx24116_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 /* Need to reset device during firmware loading */ 228c2ecf20Sopenharmony_ci int (*reset_device)(struct dvb_frontend *fe); 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci /* Need to set MPEG parameters */ 258c2ecf20Sopenharmony_ci u8 mpg_clk_pos_pol:0x02; 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci /* max bytes I2C provider can write at once */ 288c2ecf20Sopenharmony_ci u16 i2c_wr_max; 298c2ecf20Sopenharmony_ci}; 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci#if IS_REACHABLE(CONFIG_DVB_CX24116) 328c2ecf20Sopenharmony_ciextern struct dvb_frontend *cx24116_attach( 338c2ecf20Sopenharmony_ci const struct cx24116_config *config, 348c2ecf20Sopenharmony_ci struct i2c_adapter *i2c); 358c2ecf20Sopenharmony_ci#else 368c2ecf20Sopenharmony_cistatic inline struct dvb_frontend *cx24116_attach( 378c2ecf20Sopenharmony_ci const struct cx24116_config *config, 388c2ecf20Sopenharmony_ci struct i2c_adapter *i2c) 398c2ecf20Sopenharmony_ci{ 408c2ecf20Sopenharmony_ci printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 418c2ecf20Sopenharmony_ci return NULL; 428c2ecf20Sopenharmony_ci} 438c2ecf20Sopenharmony_ci#endif 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci#endif /* CX24116_H */ 46