V4L/DVB (7513): media/dvb/dvb-usb replace remaining __FUNCTION__ occurrences
[linux-2.6-block.git] / drivers / media / dvb / frontends / cx24110.h
CommitLineData
1da177e4
LT
1/*
2 cx24110 - Single Chip Satellite Channel Receiver driver module
3
a8d995c9 4 Copyright (C) 2002 Peter Hettkamp <peter.hettkamp@htp-tel.de> based on
1da177e4
LT
5 work
6 Copyright (C) 1999 Convergence Integrated Media GmbH <ralph@convergence.de>
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22
23*/
24
25#ifndef CX24110_H
26#define CX24110_H
27
28#include <linux/dvb/frontend.h>
29
30struct cx24110_config
31{
32 /* the demodulator's i2c address */
33 u8 demod_address;
1da177e4
LT
34};
35
c10d14d6
AQ
36static inline int cx24110_pll_write(struct dvb_frontend *fe, u32 val) {
37 int r = 0;
38 u8 buf[] = {(u8) (val>>24), (u8) (val>>16), (u8) (val>>8)};
39 if (fe->ops.write)
40 r = fe->ops.write(fe, buf, 3);
41 return r;
42}
1da177e4 43
c5dec9fb 44#if defined(CONFIG_DVB_CX24110) || (defined(CONFIG_DVB_CX24110_MODULE) && defined(MODULE))
102a342b
AQ
45extern struct dvb_frontend* cx24110_attach(const struct cx24110_config* config,
46 struct i2c_adapter* i2c);
47#else
48static inline struct dvb_frontend* cx24110_attach(const struct cx24110_config* config,
49 struct i2c_adapter* i2c)
50{
51 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__);
52 return NULL;
53}
54#endif // CONFIG_DVB_CX24110
55
1da177e4 56#endif // CX24110_H