blob: dfb02db2126c1061b00225c698d3305c8d3c9220 [file] [log] [blame]
Mauro Carvalho Chehabb9ede79a2010-09-27 20:52:43 -03001/*
2 * Fujitsu mb86a20s driver
3 *
Mauro Carvalho Chehab37e59f82014-02-07 08:03:07 -02004 * Copyright (C) 2010 Mauro Carvalho Chehab
Mauro Carvalho Chehabb9ede79a2010-09-27 20:52:43 -03005 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation version 2.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 */
15
16#ifndef MB86A20S_H
17#define MB86A20S_H
18
19#include <linux/dvb/frontend.h>
20
21/**
22 * struct mb86a20s_config - Define the per-device attributes of the frontend
23 *
Mauro Carvalho Chehab0e4bbed2013-03-04 08:15:49 -030024 * @fclk: Clock frequency. If zero, assumes the default
25 * (32.57142 Mhz)
Mauro Carvalho Chehabb9ede79a2010-09-27 20:52:43 -030026 * @demod_address: the demodulator's i2c address
Mauro Carvalho Chehab0e4bbed2013-03-04 08:15:49 -030027 * @is_serial: if true, TS is serial. Otherwise, TS is parallel
Mauro Carvalho Chehabb9ede79a2010-09-27 20:52:43 -030028 */
29
30struct mb86a20s_config {
Mauro Carvalho Chehab0e4bbed2013-03-04 08:15:49 -030031 u32 fclk;
32 u8 demod_address;
33 bool is_serial;
Mauro Carvalho Chehabb9ede79a2010-09-27 20:52:43 -030034};
35
Arnd Bergmann9b174522015-02-18 14:12:42 -030036#if IS_REACHABLE(CONFIG_DVB_MB86A20S)
Mauro Carvalho Chehabb9ede79a2010-09-27 20:52:43 -030037extern struct dvb_frontend *mb86a20s_attach(const struct mb86a20s_config *config,
38 struct i2c_adapter *i2c);
39extern struct i2c_adapter *mb86a20s_get_tuner_i2c_adapter(struct dvb_frontend *);
40#else
41static inline struct dvb_frontend *mb86a20s_attach(
42 const struct mb86a20s_config *config, struct i2c_adapter *i2c)
43{
44 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
45 return NULL;
46}
Hans Verkuil8b012fc2015-04-27 04:29:53 -030047static inline struct i2c_adapter *
Mauro Carvalho Chehabb9ede79a2010-09-27 20:52:43 -030048 mb86a20s_get_tuner_i2c_adapter(struct dvb_frontend *fe)
49{
50 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
51 return NULL;
52}
53#endif
54
55#endif /* MB86A20S */