blob: 73316eb417f072a4d436527ac6db9fe952b3b5b8 [file] [log] [blame]
David Brazdil0f672f62019-12-10 10:32:29 +00001/* SPDX-License-Identifier: GPL-2.0-or-later */
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00002/*
3 VES1820 - Single Chip Cable Channel Receiver driver module
4
5 Copyright (C) 1999 Convergence Integrated Media GmbH <ralph@convergence.de>
6
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00007*/
8
9#ifndef VES1820_H
10#define VES1820_H
11
12#include <linux/dvb/frontend.h>
13
14#define VES1820_SELAGC_PWM 0
15#define VES1820_SELAGC_SIGNAMPERR 1
16
17struct ves1820_config
18{
19 /* the demodulator's i2c address */
20 u8 demod_address;
21
22 /* value of XIN to use */
23 u32 xin;
24
25 /* does inversion need inverted? */
26 u8 invert:1;
27
28 /* SELAGC control */
29 u8 selagc:1;
30};
31
32#if IS_REACHABLE(CONFIG_DVB_VES1820)
33extern struct dvb_frontend* ves1820_attach(const struct ves1820_config* config,
34 struct i2c_adapter* i2c, u8 pwm);
35#else
36static inline struct dvb_frontend* ves1820_attach(const struct ves1820_config* config,
37 struct i2c_adapter* i2c, u8 pwm)
38{
39 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
40 return NULL;
41}
42#endif // CONFIG_DVB_VES1820
43
44#endif // VES1820_H