blob: 19c588a595883be93f0cef4102e647fdbaa21e71 [file] [log] [blame]
Ralph Metzler0f0b2702011-01-10 06:36:15 -03001/*
2 * cxd2099.h: Driver for the CXD2099AR Common Interface Controller
3 *
Ralph Metzler6eb94192011-07-03 14:00:57 -03004 * Copyright (C) 2010-2011 Digital Devices GmbH
Ralph Metzler0f0b2702011-01-10 06:36:15 -03005 *
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * version 2 only, as published by the Free Software Foundation.
10 *
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 * 02110-1301, USA
22 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
23 */
24
25#ifndef _CXD2099_H_
26#define _CXD2099_H_
27
28#include <dvb_ca_en50221.h>
29
Ralph Metzler6eb94192011-07-03 14:00:57 -030030struct cxd2099_cfg {
31 u32 bitrate;
32 u8 adr;
Oliver Endriss9daf9bc2011-07-03 14:02:24 -030033 u8 polarity:1;
34 u8 clock_mode:1;
Ralph Metzler6eb94192011-07-03 14:00:57 -030035};
36
Mauro Carvalho Chehab81122482011-01-17 14:20:49 -020037#if defined(CONFIG_DVB_CXD2099) || \
Oliver Endriss9daf9bc2011-07-03 14:02:24 -030038 (defined(CONFIG_DVB_CXD2099_MODULE) && defined(MODULE))
Ralph Metzler6eb94192011-07-03 14:00:57 -030039struct dvb_ca_en50221 *cxd2099_attach(struct cxd2099_cfg *cfg,
40 void *priv, struct i2c_adapter *i2c);
Mauro Carvalho Chehab81122482011-01-17 14:20:49 -020041#else
Ralph Metzler6eb94192011-07-03 14:00:57 -030042
43static inline struct dvb_ca_en50221 *cxd2099_attach(struct cxd2099_cfg *cfg,
Oliver Endriss7dfd0712011-07-03 18:26:22 -030044 void *priv, struct i2c_adapter *i2c)
Mauro Carvalho Chehab81122482011-01-17 14:20:49 -020045{
46 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
47 return NULL;
48}
49#endif
Ralph Metzler0f0b2702011-01-10 06:36:15 -030050
51#endif