0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef STV0288_H
0016 #define STV0288_H
0017
0018 #include <linux/dvb/frontend.h>
0019 #include <media/dvb_frontend.h>
0020
0021 struct stv0288_config {
0022
0023 u8 demod_address;
0024
0025 u8* inittab;
0026
0027
0028 int min_delay_ms;
0029
0030 int (*set_ts_params)(struct dvb_frontend *fe, int is_punctured);
0031 };
0032
0033 #if IS_REACHABLE(CONFIG_DVB_STV0288)
0034 extern struct dvb_frontend *stv0288_attach(const struct stv0288_config *config,
0035 struct i2c_adapter *i2c);
0036 #else
0037 static inline struct dvb_frontend *stv0288_attach(const struct stv0288_config *config,
0038 struct i2c_adapter *i2c)
0039 {
0040 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
0041 return NULL;
0042 }
0043 #endif
0044
0045 static inline int stv0288_writereg(struct dvb_frontend *fe, u8 reg, u8 val)
0046 {
0047 int r = 0;
0048 u8 buf[] = { reg, val };
0049 if (fe->ops.write)
0050 r = fe->ops.write(fe, buf, 2);
0051 return r;
0052 }
0053
0054 #endif