1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */ 2*4882a593Smuzhiyun /* 3*4882a593Smuzhiyun * Driver for the ST STV0910 DVB-S/S2 demodulator. 4*4882a593Smuzhiyun * 5*4882a593Smuzhiyun * Copyright (C) 2014-2015 Ralph Metzler <rjkm@metzlerbros.de> 6*4882a593Smuzhiyun * Marcus Metzler <mocm@metzlerbros.de> 7*4882a593Smuzhiyun * developed for Digital Devices GmbH 8*4882a593Smuzhiyun * 9*4882a593Smuzhiyun * This program is free software; you can redistribute it and/or 10*4882a593Smuzhiyun * modify it under the terms of the GNU General Public License 11*4882a593Smuzhiyun * version 2 only, as published by the Free Software Foundation. 12*4882a593Smuzhiyun * 13*4882a593Smuzhiyun * This program is distributed in the hope that it will be useful, 14*4882a593Smuzhiyun * but WITHOUT ANY WARRANTY; without even the implied warranty of 15*4882a593Smuzhiyun * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16*4882a593Smuzhiyun * GNU General Public License for more details. 17*4882a593Smuzhiyun */ 18*4882a593Smuzhiyun 19*4882a593Smuzhiyun #ifndef _STV0910_H_ 20*4882a593Smuzhiyun #define _STV0910_H_ 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun #include <linux/types.h> 23*4882a593Smuzhiyun #include <linux/i2c.h> 24*4882a593Smuzhiyun 25*4882a593Smuzhiyun struct stv0910_cfg { 26*4882a593Smuzhiyun u32 clk; 27*4882a593Smuzhiyun u8 adr; 28*4882a593Smuzhiyun u8 parallel; 29*4882a593Smuzhiyun u8 rptlvl; 30*4882a593Smuzhiyun u8 single; 31*4882a593Smuzhiyun u8 tsspeed; 32*4882a593Smuzhiyun }; 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun #if IS_REACHABLE(CONFIG_DVB_STV0910) 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun struct dvb_frontend *stv0910_attach(struct i2c_adapter *i2c, 37*4882a593Smuzhiyun struct stv0910_cfg *cfg, int nr); 38*4882a593Smuzhiyun 39*4882a593Smuzhiyun #else 40*4882a593Smuzhiyun stv0910_attach(struct i2c_adapter * i2c,struct stv0910_cfg * cfg,int nr)41*4882a593Smuzhiyunstatic inline struct dvb_frontend *stv0910_attach(struct i2c_adapter *i2c, 42*4882a593Smuzhiyun struct stv0910_cfg *cfg, 43*4882a593Smuzhiyun int nr) 44*4882a593Smuzhiyun { 45*4882a593Smuzhiyun pr_warn("%s: driver disabled by Kconfig\n", __func__); 46*4882a593Smuzhiyun return NULL; 47*4882a593Smuzhiyun } 48*4882a593Smuzhiyun 49*4882a593Smuzhiyun #endif /* CONFIG_DVB_STV0910 */ 50*4882a593Smuzhiyun 51*4882a593Smuzhiyun #endif /* _STV0910_H_ */ 52