#ifndef TDA1004X_H
#define TDA1004X_H
#include <linux/dvb/frontend.h>
#include <linux/firmware.h>
enum tda10046_xtal { … };
enum tda10046_agc { … };
enum tda10046_gpio { … };
enum tda10046_if { … };
enum tda10046_tsout { … };
struct tda1004x_config
{ … };
enum tda1004x_demod { … };
struct tda1004x_state { … };
#if IS_REACHABLE(CONFIG_DVB_TDA1004X)
extern struct dvb_frontend* tda10045_attach(const struct tda1004x_config* config,
struct i2c_adapter* i2c);
extern struct dvb_frontend* tda10046_attach(const struct tda1004x_config* config,
struct i2c_adapter* i2c);
#else
static inline struct dvb_frontend* tda10045_attach(const struct tda1004x_config* config,
struct i2c_adapter* i2c)
{
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
return NULL;
}
static inline struct dvb_frontend* tda10046_attach(const struct tda1004x_config* config,
struct i2c_adapter* i2c)
{
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
return NULL;
}
#endif
static inline int tda1004x_writereg(struct dvb_frontend *fe, u8 reg, u8 val) { … }
#endif