xref: /openbmc/linux/drivers/media/tuners/fc0012.h (revision b830f94f)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * Fitipower FC0012 tuner driver - include
4  *
5  * Copyright (C) 2012 Hans-Frieder Vogt <hfvogt@gmx.net>
6  */
7 
8 #ifndef _FC0012_H_
9 #define _FC0012_H_
10 
11 #include <media/dvb_frontend.h>
12 #include "fc001x-common.h"
13 
14 struct fc0012_config {
15 	/*
16 	 * I2C address
17 	 */
18 	u8 i2c_address;
19 
20 	/*
21 	 * clock
22 	 */
23 	enum fc001x_xtal_freq xtal_freq;
24 
25 	bool dual_master;
26 
27 	/*
28 	 * RF loop-through
29 	 */
30 	bool loop_through;
31 
32 	/*
33 	 * clock output
34 	 */
35 	bool clock_out;
36 };
37 
38 #if IS_REACHABLE(CONFIG_MEDIA_TUNER_FC0012)
39 extern struct dvb_frontend *fc0012_attach(struct dvb_frontend *fe,
40 					struct i2c_adapter *i2c,
41 					const struct fc0012_config *cfg);
42 #else
43 static inline struct dvb_frontend *fc0012_attach(struct dvb_frontend *fe,
44 					struct i2c_adapter *i2c,
45 					const struct fc0012_config *cfg)
46 {
47 	pr_warn("%s: driver disabled by Kconfig\n", __func__);
48 	return NULL;
49 }
50 #endif
51 
52 #endif
53