Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * stv0900.h
0004  *
0005  * Driver for ST STV0900 satellite demodulator IC.
0006  *
0007  * Copyright (C) ST Microelectronics.
0008  * Copyright (C) 2009 NetUP Inc.
0009  * Copyright (C) 2009 Igor M. Liplianin <liplianin@netup.ru>
0010  */
0011 
0012 #ifndef STV0900_H
0013 #define STV0900_H
0014 
0015 #include <linux/dvb/frontend.h>
0016 #include <media/dvb_frontend.h>
0017 
0018 struct stv0900_reg {
0019     u16 addr;
0020     u8  val;
0021 };
0022 
0023 struct stv0900_config {
0024     u8 demod_address;
0025     u8 demod_mode;
0026     u32 xtal;
0027     u8 clkmode;/* 0 for CLKI,  2 for XTALI */
0028 
0029     u8 diseqc_mode;
0030 
0031     u8 path1_mode;
0032     u8 path2_mode;
0033     struct stv0900_reg *ts_config_regs;
0034     u8 tun1_maddress;/* 0, 1, 2, 3 for 0xc0, 0xc2, 0xc4, 0xc6 */
0035     u8 tun2_maddress;
0036     u8 tun1_adc;/* 1 for stv6110, 2 for stb6100 */
0037     u8 tun2_adc;
0038     u8 tun1_type;/* for now 3 for stb6100 auto, else - software */
0039     u8 tun2_type;
0040     /* Set device param to start dma */
0041     int (*set_ts_params)(struct dvb_frontend *fe, int is_punctured);
0042     /* Hook for Lock LED */
0043     void (*set_lock_led)(struct dvb_frontend *fe, int offon);
0044 };
0045 
0046 #if IS_REACHABLE(CONFIG_DVB_STV0900)
0047 extern struct dvb_frontend *stv0900_attach(const struct stv0900_config *config,
0048                     struct i2c_adapter *i2c, int demod);
0049 #else
0050 static inline struct dvb_frontend *stv0900_attach(const struct stv0900_config *config,
0051                     struct i2c_adapter *i2c, int demod)
0052 {
0053     printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
0054     return NULL;
0055 }
0056 #endif
0057 
0058 #endif
0059