blob: 142d93e7d02bf27f257bfcea7b5497caba6050b9 [file] [log] [blame]
Andrew de Quincey96bf2f22005-07-07 17:57:53 -07001/*
Patrick Boettcherdbad1082008-04-13 15:47:53 -03002 * Driver for
3 * Samsung S5H1420 and
4 * PnpNetwork PN1010 QPSK Demodulator
5 *
6 * Copyright (C) 2005 Andrew de Quincey <adq_dvb@lidskialf.net>
7 * Copyright (C) 2005-8 Patrick Boettcher <pb@linuxtv.org>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 *
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 */
Andrew de Quincey96bf2f22005-07-07 17:57:53 -070024#ifndef S5H1420_H
25#define S5H1420_H
26
27#include <linux/dvb/frontend.h>
28
29struct s5h1420_config
30{
31 /* the demodulator's i2c address */
32 u8 demod_address;
33
Andrew de Quinceya9d6a802005-09-09 13:02:31 -070034 /* does the inversion require inversion? */
Patrick Boettcherc18c5ff2008-09-06 13:31:58 -030035 u8 invert:1;
Patrick Boettcherdbad1082008-04-13 15:47:53 -030036
Patrick Boettcherc18c5ff2008-09-06 13:31:58 -030037 u8 repeated_start_workaround:1;
38 u8 cdclk_polarity:1; /* 1 == falling edge, 0 == raising edge */
39
40 u8 serial_mpeg:1;
Andrew de Quincey96bf2f22005-07-07 17:57:53 -070041};
42
Arnd Bergmann9b174522015-02-18 14:12:42 -030043#if IS_REACHABLE(CONFIG_DVB_S5H1420)
Patrick Boettcherdbad1082008-04-13 15:47:53 -030044extern struct dvb_frontend *s5h1420_attach(const struct s5h1420_config *config,
45 struct i2c_adapter *i2c);
46extern struct i2c_adapter *s5h1420_get_tuner_i2c_adapter(struct dvb_frontend *fe);
Andrew de Quincey102a3422006-08-08 09:10:08 -030047#else
Patrick Boettcherdbad1082008-04-13 15:47:53 -030048static inline struct dvb_frontend *s5h1420_attach(const struct s5h1420_config *config,
49 struct i2c_adapter *i2c)
Andrew de Quincey102a3422006-08-08 09:10:08 -030050{
Harvey Harrison271ddbf2008-04-08 23:20:00 -030051 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
Andrew de Quincey102a3422006-08-08 09:10:08 -030052 return NULL;
53}
Patrick Boettcherdbad1082008-04-13 15:47:53 -030054
55static inline struct i2c_adapter *s5h1420_get_tuner_i2c_adapter(struct dvb_frontend *fe)
56{
57 return NULL;
58}
Andrew de Quincey102a3422006-08-08 09:10:08 -030059#endif // CONFIG_DVB_S5H1420
Andrew de Quincey96bf2f22005-07-07 17:57:53 -070060
61#endif // S5H1420_H