blob: 99910567b6e384b0276e088a045ee85fe7d24fdb [file] [log] [blame]
Thomas Gleixnerc942fdd2019-05-27 08:55:06 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Hans-Frieder Vogtef89ec72012-05-06 16:56:55 -03002/*
3 * Fitipower FC0012 tuner driver - include
4 *
5 * Copyright (C) 2012 Hans-Frieder Vogt <hfvogt@gmx.net>
Hans-Frieder Vogtef89ec72012-05-06 16:56:55 -03006 */
7
8#ifndef _FC0012_H_
9#define _FC0012_H_
10
Mauro Carvalho Chehabfada1932017-12-28 13:03:51 -050011#include <media/dvb_frontend.h>
Hans-Frieder Vogtef89ec72012-05-06 16:56:55 -030012#include "fc001x-common.h"
13
Antti Palosaariad3a7582012-12-08 23:27:49 -030014struct fc0012_config {
15 /*
16 * I2C address
17 */
18 u8 i2c_address;
19
20 /*
21 * clock
22 */
23 enum fc001x_xtal_freq xtal_freq;
24
Antti Palosaari3a984772012-12-09 12:33:04 -030025 bool dual_master;
Antti Palosaari71b1e822012-12-09 00:30:08 -030026
27 /*
28 * RF loop-through
29 */
30 bool loop_through;
Antti Palosaari3b0d51a2012-12-09 11:46:40 -030031
32 /*
33 * clock output
34 */
35 bool clock_out;
Antti Palosaariad3a7582012-12-08 23:27:49 -030036};
37
Arnd Bergmann9b174522015-02-18 14:12:42 -030038#if IS_REACHABLE(CONFIG_MEDIA_TUNER_FC0012)
Hans-Frieder Vogtef89ec72012-05-06 16:56:55 -030039extern struct dvb_frontend *fc0012_attach(struct dvb_frontend *fe,
40 struct i2c_adapter *i2c,
Antti Palosaariad3a7582012-12-08 23:27:49 -030041 const struct fc0012_config *cfg);
Hans-Frieder Vogtef89ec72012-05-06 16:56:55 -030042#else
43static inline struct dvb_frontend *fc0012_attach(struct dvb_frontend *fe,
44 struct i2c_adapter *i2c,
Antti Palosaariad3a7582012-12-08 23:27:49 -030045 const struct fc0012_config *cfg)
Hans-Frieder Vogtef89ec72012-05-06 16:56:55 -030046{
Antti Palosaari45626202012-12-09 13:42:25 -030047 pr_warn("%s: driver disabled by Kconfig\n", __func__);
Hans-Frieder Vogtef89ec72012-05-06 16:56:55 -030048 return NULL;
49}
50#endif
51
52#endif