treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / media / dvb-frontends / stv6110.h
blob1cee9e62b75c9765530751dc4b06e839d982df96
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 * stv6110.h
5 * Driver for ST STV6110 satellite tuner IC.
7 * Copyright (C) 2009 NetUP Inc.
8 * Copyright (C) 2009 Igor M. Liplianin <liplianin@netup.ru>
9 */
11 #ifndef __DVB_STV6110_H__
12 #define __DVB_STV6110_H__
14 #include <linux/i2c.h>
15 #include <media/dvb_frontend.h>
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
27 struct stv6110_config {
28 u8 i2c_address;
29 u32 mclk;
30 u8 gain;
31 u8 clk_div; /* divisor value for the output clock */
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)
43 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
44 return NULL;
46 #endif
48 #endif