Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[linux-2.6-block.git] / drivers / media / dvb-frontends / cx24110.h
CommitLineData
74ba9207 1/* SPDX-License-Identifier: GPL-2.0-or-later */
1da177e4
LT
2/*
3 cx24110 - Single Chip Satellite Channel Receiver driver module
4
a8d995c9 5 Copyright (C) 2002 Peter Hettkamp <peter.hettkamp@htp-tel.de> based on
1da177e4
LT
6 work
7 Copyright (C) 1999 Convergence Integrated Media GmbH <ralph@convergence.de>
8
1da177e4
LT
9
10*/
11
12#ifndef CX24110_H
13#define CX24110_H
14
15#include <linux/dvb/frontend.h>
16
17struct cx24110_config
18{
19 /* the demodulator's i2c address */
20 u8 demod_address;
1da177e4
LT
21};
22
d45b9b8a
HV
23static inline int cx24110_pll_write(struct dvb_frontend *fe, u32 val)
24{
25 u8 buf[] = {
26 (u8)((val >> 24) & 0xff),
27 (u8)((val >> 16) & 0xff),
28 (u8)((val >> 8) & 0xff)
29 };
30
c10d14d6 31 if (fe->ops.write)
d45b9b8a
HV
32 return fe->ops.write(fe, buf, 3);
33 return 0;
c10d14d6 34}
1da177e4 35
9b174527 36#if IS_REACHABLE(CONFIG_DVB_CX24110)
102a342b
AQ
37extern struct dvb_frontend* cx24110_attach(const struct cx24110_config* config,
38 struct i2c_adapter* i2c);
39#else
40static inline struct dvb_frontend* cx24110_attach(const struct cx24110_config* config,
41 struct i2c_adapter* i2c)
42{
271ddbf7 43 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
102a342b
AQ
44 return NULL;
45}
46#endif // CONFIG_DVB_CX24110
47
1da177e4 48#endif // CX24110_H