1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
2 | /* |
3 | * stv6110.h |
4 | * |
5 | * Driver for ST STV6110 satellite tuner IC. |
6 | * |
7 | * Copyright (C) 2009 NetUP Inc. |
8 | * Copyright (C) 2009 Igor M. Liplianin <liplianin@netup.ru> |
9 | */ |
10 | |
11 | #ifndef __DVB_STV6110_H__ |
12 | #define __DVB_STV6110_H__ |
13 | |
14 | #include <linux/i2c.h> |
15 | #include <media/dvb_frontend.h> |
16 | |
17 | /* registers */ |
18 | #define RSTV6110_CTRL1 0 |
19 | #define RSTV6110_CTRL2 1 |
20 | #define RSTV6110_TUNING1 2 |
21 | #define RSTV6110_TUNING2 3 |
22 | #define RSTV6110_CTRL3 4 |
23 | #define RSTV6110_STAT1 5 |
24 | #define RSTV6110_STAT2 6 |
25 | #define RSTV6110_STAT3 7 |
26 | |
27 | struct stv6110_config { |
28 | u8 i2c_address; |
29 | u32 mclk; |
30 | u8 gain; |
31 | u8 clk_div; /* divisor value for the output clock */ |
32 | }; |
33 | |
34 | #if IS_REACHABLE(CONFIG_DVB_STV6110) |
35 | extern struct dvb_frontend *stv6110_attach(struct dvb_frontend *fe, |
36 | const struct stv6110_config *config, |
37 | struct i2c_adapter *i2c); |
38 | #else |
39 | static inline struct dvb_frontend *stv6110_attach(struct dvb_frontend *fe, |
40 | const struct stv6110_config *config, |
41 | struct i2c_adapter *i2c) |
42 | { |
43 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n" , __func__); |
44 | return NULL; |
45 | } |
46 | #endif |
47 | |
48 | #endif |
49 | |