xref: /openbmc/linux/drivers/media/dvb-frontends/cx24117.h (revision d10e8280c4c2513d3e7350c27d8e6f0fa03a5f71)
10d788680SLuis Alves /*
20d788680SLuis Alves     Conexant cx24117/cx24132 - Dual DVBS/S2 Satellite demod/tuner driver
30d788680SLuis Alves 
40d788680SLuis Alves     Copyright (C) 2013 Luis Alves <ljalvs@gmail.com>
50d788680SLuis Alves 	(based on cx24116.h by Steven Toth)
60d788680SLuis Alves 
70d788680SLuis Alves     This program is free software; you can redistribute it and/or modify
80d788680SLuis Alves     it under the terms of the GNU General Public License as published by
90d788680SLuis Alves     the Free Software Foundation; either version 2 of the License, or
100d788680SLuis Alves     (at your option) any later version.
110d788680SLuis Alves 
120d788680SLuis Alves     This program is distributed in the hope that it will be useful,
130d788680SLuis Alves     but WITHOUT ANY WARRANTY; without even the implied warranty of
140d788680SLuis Alves     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
150d788680SLuis Alves     GNU General Public License for more details.
160d788680SLuis Alves 
170d788680SLuis Alves     You should have received a copy of the GNU General Public License
180d788680SLuis Alves     along with this program; if not, write to the Free Software
190d788680SLuis Alves     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
200d788680SLuis Alves */
210d788680SLuis Alves 
220d788680SLuis Alves #ifndef CX24117_H
230d788680SLuis Alves #define CX24117_H
240d788680SLuis Alves 
250d788680SLuis Alves #include <linux/kconfig.h>
260d788680SLuis Alves #include <linux/dvb/frontend.h>
270d788680SLuis Alves 
280d788680SLuis Alves struct cx24117_config {
290d788680SLuis Alves 	/* the demodulator's i2c address */
300d788680SLuis Alves 	u8 demod_address;
310d788680SLuis Alves };
320d788680SLuis Alves 
330d788680SLuis Alves #if IS_ENABLED(CONFIG_DVB_CX24117)
340d788680SLuis Alves extern struct dvb_frontend *cx24117_attach(
350d788680SLuis Alves 	const struct cx24117_config *config,
36*d10e8280SLuis Alves 	struct i2c_adapter *i2c);
370d788680SLuis Alves #else
380d788680SLuis Alves static inline struct dvb_frontend *cx24117_attach(
390d788680SLuis Alves 	const struct cx24117_config *config,
40*d10e8280SLuis Alves 	struct i2c_adapter *i2c)
410d788680SLuis Alves {
420d788680SLuis Alves 	dev_warn(&i2c->dev, "%s: driver disabled by Kconfig\n", __func__);
430d788680SLuis Alves 	return NULL;
440d788680SLuis Alves }
450d788680SLuis Alves #endif
460d788680SLuis Alves 
470d788680SLuis Alves #endif /* CX24117_H */
48