1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 2ccae7af2SMauro Carvalho Chehab #ifndef LINUX_FC0011_H_ 3ccae7af2SMauro Carvalho Chehab #define LINUX_FC0011_H_ 4ccae7af2SMauro Carvalho Chehab 5*fada1935SMauro Carvalho Chehab #include <media/dvb_frontend.h> 6ccae7af2SMauro Carvalho Chehab 7ccae7af2SMauro Carvalho Chehab 8ccae7af2SMauro Carvalho Chehab /** struct fc0011_config - fc0011 hardware config 9ccae7af2SMauro Carvalho Chehab * 10ccae7af2SMauro Carvalho Chehab * @i2c_address: I2C bus address. 11ccae7af2SMauro Carvalho Chehab */ 12ccae7af2SMauro Carvalho Chehab struct fc0011_config { 13ccae7af2SMauro Carvalho Chehab u8 i2c_address; 14ccae7af2SMauro Carvalho Chehab }; 15ccae7af2SMauro Carvalho Chehab 16ccae7af2SMauro Carvalho Chehab /** enum fc0011_fe_callback_commands - Frontend callbacks 17ccae7af2SMauro Carvalho Chehab * 18ccae7af2SMauro Carvalho Chehab * @FC0011_FE_CALLBACK_POWER: Power on tuner hardware. 19ccae7af2SMauro Carvalho Chehab * @FC0011_FE_CALLBACK_RESET: Request a tuner reset. 20ccae7af2SMauro Carvalho Chehab */ 21ccae7af2SMauro Carvalho Chehab enum fc0011_fe_callback_commands { 22ccae7af2SMauro Carvalho Chehab FC0011_FE_CALLBACK_POWER, 23ccae7af2SMauro Carvalho Chehab FC0011_FE_CALLBACK_RESET, 24ccae7af2SMauro Carvalho Chehab }; 25ccae7af2SMauro Carvalho Chehab 269b174527SArnd Bergmann #if IS_REACHABLE(CONFIG_MEDIA_TUNER_FC0011) 27ccae7af2SMauro Carvalho Chehab struct dvb_frontend *fc0011_attach(struct dvb_frontend *fe, 28ccae7af2SMauro Carvalho Chehab struct i2c_adapter *i2c, 29ccae7af2SMauro Carvalho Chehab const struct fc0011_config *config); 30ccae7af2SMauro Carvalho Chehab #else 31ccae7af2SMauro Carvalho Chehab static inline fc0011_attach(struct dvb_frontend * fe,struct i2c_adapter * i2c,const struct fc0011_config * config)32ccae7af2SMauro Carvalho Chehabstruct dvb_frontend *fc0011_attach(struct dvb_frontend *fe, 33ccae7af2SMauro Carvalho Chehab struct i2c_adapter *i2c, 34ccae7af2SMauro Carvalho Chehab const struct fc0011_config *config) 35ccae7af2SMauro Carvalho Chehab { 36ccae7af2SMauro Carvalho Chehab dev_err(&i2c->dev, "fc0011 driver disabled in Kconfig\n"); 37ccae7af2SMauro Carvalho Chehab return NULL; 38ccae7af2SMauro Carvalho Chehab } 39ccae7af2SMauro Carvalho Chehab #endif 40ccae7af2SMauro Carvalho Chehab 41ccae7af2SMauro Carvalho Chehab #endif /* LINUX_FC0011_H_ */ 42