0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef CX24110_H
0013 #define CX24110_H
0014
0015 #include <linux/dvb/frontend.h>
0016
0017 struct cx24110_config
0018 {
0019
0020 u8 demod_address;
0021 };
0022
0023 static inline int cx24110_pll_write(struct dvb_frontend *fe, u32 val)
0024 {
0025 u8 buf[] = {
0026 (u8)((val >> 24) & 0xff),
0027 (u8)((val >> 16) & 0xff),
0028 (u8)((val >> 8) & 0xff)
0029 };
0030
0031 if (fe->ops.write)
0032 return fe->ops.write(fe, buf, 3);
0033 return 0;
0034 }
0035
0036 #if IS_REACHABLE(CONFIG_DVB_CX24110)
0037 extern struct dvb_frontend* cx24110_attach(const struct cx24110_config* config,
0038 struct i2c_adapter* i2c);
0039 #else
0040 static inline struct dvb_frontend* cx24110_attach(const struct cx24110_config* config,
0041 struct i2c_adapter* i2c)
0042 {
0043 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
0044 return NULL;
0045 }
0046 #endif
0047
0048 #endif