Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * stv0367.h
0004  *
0005  * Driver for ST STV0367 DVB-T & DVB-C demodulator IC.
0006  *
0007  * Copyright (C) ST Microelectronics.
0008  * Copyright (C) 2010,2011 NetUP Inc.
0009  * Copyright (C) 2010,2011 Igor M. Liplianin <liplianin@netup.ru>
0010  */
0011 
0012 #ifndef STV0367_H
0013 #define STV0367_H
0014 
0015 #include <linux/dvb/frontend.h>
0016 #include <media/dvb_frontend.h>
0017 
0018 #define STV0367_ICSPEED_53125   53125000
0019 #define STV0367_ICSPEED_58000   58000000
0020 
0021 struct stv0367_config {
0022     u8 demod_address;
0023     u32 xtal;
0024     u32 if_khz;/*4500*/
0025     int if_iq_mode;
0026     int ts_mode;
0027     int clk_pol;
0028 };
0029 
0030 #if IS_REACHABLE(CONFIG_DVB_STV0367)
0031 extern struct
0032 dvb_frontend *stv0367ter_attach(const struct stv0367_config *config,
0033                     struct i2c_adapter *i2c);
0034 extern struct
0035 dvb_frontend *stv0367cab_attach(const struct stv0367_config *config,
0036                     struct i2c_adapter *i2c);
0037 extern struct
0038 dvb_frontend *stv0367ddb_attach(const struct stv0367_config *config,
0039                     struct i2c_adapter *i2c);
0040 #else
0041 static inline struct
0042 dvb_frontend *stv0367ter_attach(const struct stv0367_config *config,
0043                     struct i2c_adapter *i2c)
0044 {
0045     printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
0046     return NULL;
0047 }
0048 static inline struct
0049 dvb_frontend *stv0367cab_attach(const struct stv0367_config *config,
0050                     struct i2c_adapter *i2c)
0051 {
0052     printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
0053     return NULL;
0054 }
0055 static inline struct
0056 dvb_frontend *stv0367ddb_attach(const struct stv0367_config *config,
0057                     struct i2c_adapter *i2c)
0058 {
0059     printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
0060     return NULL;
0061 }
0062 #endif
0063 
0064 #endif