1ccae7af2SMauro Carvalho Chehab /* 2ccae7af2SMauro Carvalho Chehab This program is free software; you can redistribute it and/or modify 3ccae7af2SMauro Carvalho Chehab it under the terms of the GNU General Public License as published by 4ccae7af2SMauro Carvalho Chehab the Free Software Foundation; either version 2 of the License, or 5ccae7af2SMauro Carvalho Chehab (at your option) any later version. 6ccae7af2SMauro Carvalho Chehab 7ccae7af2SMauro Carvalho Chehab This program is distributed in the hope that it will be useful, 8ccae7af2SMauro Carvalho Chehab but WITHOUT ANY WARRANTY; without even the implied warranty of 9ccae7af2SMauro Carvalho Chehab MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10ccae7af2SMauro Carvalho Chehab GNU General Public License for more details. 11ccae7af2SMauro Carvalho Chehab 12ccae7af2SMauro Carvalho Chehab You should have received a copy of the GNU General Public License 13ccae7af2SMauro Carvalho Chehab along with this program; if not, write to the Free Software 14ccae7af2SMauro Carvalho Chehab Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 15ccae7af2SMauro Carvalho Chehab */ 16ccae7af2SMauro Carvalho Chehab 17ccae7af2SMauro Carvalho Chehab #ifndef __TDA8290_H__ 18ccae7af2SMauro Carvalho Chehab #define __TDA8290_H__ 19ccae7af2SMauro Carvalho Chehab 20ccae7af2SMauro Carvalho Chehab #include <linux/i2c.h> 21ccae7af2SMauro Carvalho Chehab #include "dvb_frontend.h" 22*5b0e5350SOndrej Zary #include "tda18271.h" 23ccae7af2SMauro Carvalho Chehab 24ccae7af2SMauro Carvalho Chehab struct tda829x_config { 25ccae7af2SMauro Carvalho Chehab unsigned int lna_cfg; 26ccae7af2SMauro Carvalho Chehab 27ccae7af2SMauro Carvalho Chehab unsigned int probe_tuner:1; 28ccae7af2SMauro Carvalho Chehab #define TDA829X_PROBE_TUNER 0 29ccae7af2SMauro Carvalho Chehab #define TDA829X_DONT_PROBE 1 302f719f7aSOndrej Zary unsigned int no_i2c_gate:1; 31*5b0e5350SOndrej Zary struct tda18271_std_map *tda18271_std_map; 32ccae7af2SMauro Carvalho Chehab }; 33ccae7af2SMauro Carvalho Chehab 347b34be71SPeter Senna Tschudin #if IS_ENABLED(CONFIG_MEDIA_TUNER_TDA8290) 35ccae7af2SMauro Carvalho Chehab extern int tda829x_probe(struct i2c_adapter *i2c_adap, u8 i2c_addr); 36ccae7af2SMauro Carvalho Chehab 37ccae7af2SMauro Carvalho Chehab extern struct dvb_frontend *tda829x_attach(struct dvb_frontend *fe, 38ccae7af2SMauro Carvalho Chehab struct i2c_adapter *i2c_adap, 39ccae7af2SMauro Carvalho Chehab u8 i2c_addr, 40ccae7af2SMauro Carvalho Chehab struct tda829x_config *cfg); 41ccae7af2SMauro Carvalho Chehab #else 42ccae7af2SMauro Carvalho Chehab static inline int tda829x_probe(struct i2c_adapter *i2c_adap, u8 i2c_addr) 43ccae7af2SMauro Carvalho Chehab { 44ccae7af2SMauro Carvalho Chehab printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 45ccae7af2SMauro Carvalho Chehab return -EINVAL; 46ccae7af2SMauro Carvalho Chehab } 47ccae7af2SMauro Carvalho Chehab 48ccae7af2SMauro Carvalho Chehab static inline struct dvb_frontend *tda829x_attach(struct dvb_frontend *fe, 49ccae7af2SMauro Carvalho Chehab struct i2c_adapter *i2c_adap, 50ccae7af2SMauro Carvalho Chehab u8 i2c_addr, 51ccae7af2SMauro Carvalho Chehab struct tda829x_config *cfg) 52ccae7af2SMauro Carvalho Chehab { 53ccae7af2SMauro Carvalho Chehab printk(KERN_INFO "%s: not probed - driver disabled by Kconfig\n", 54ccae7af2SMauro Carvalho Chehab __func__); 55ccae7af2SMauro Carvalho Chehab return NULL; 56ccae7af2SMauro Carvalho Chehab } 57ccae7af2SMauro Carvalho Chehab #endif 58ccae7af2SMauro Carvalho Chehab 59ccae7af2SMauro Carvalho Chehab #endif /* __TDA8290_H__ */ 60