treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / media / dvb-frontends / stv0288.h
blob8690aa61bddbebb938b787bd4039e47e05b77605
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 Driver for ST STV0288 demodulator
5 Copyright (C) 2006 Georg Acher, BayCom GmbH, acher (at) baycom (dot) de
6 for Reel Multimedia
7 Copyright (C) 2008 TurboSight.com, <bob@turbosight.com>
8 Copyright (C) 2008 Igor M. Liplianin <liplianin@me.by>
9 Removed stb6000 specific tuner code and revised some
10 procedures.
15 #ifndef STV0288_H
16 #define STV0288_H
18 #include <linux/dvb/frontend.h>
19 #include <media/dvb_frontend.h>
21 struct stv0288_config {
22 /* the demodulator's i2c address */
23 u8 demod_address;
25 u8* inittab;
27 /* minimum delay before retuning */
28 int min_delay_ms;
30 int (*set_ts_params)(struct dvb_frontend *fe, int is_punctured);
33 #if IS_REACHABLE(CONFIG_DVB_STV0288)
34 extern struct dvb_frontend *stv0288_attach(const struct stv0288_config *config,
35 struct i2c_adapter *i2c);
36 #else
37 static inline struct dvb_frontend *stv0288_attach(const struct stv0288_config *config,
38 struct i2c_adapter *i2c)
40 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
41 return NULL;
43 #endif /* CONFIG_DVB_STV0288 */
45 static inline int stv0288_writereg(struct dvb_frontend *fe, u8 reg, u8 val)
47 int r = 0;
48 u8 buf[] = { reg, val };
49 if (fe->ops.write)
50 r = fe->ops.write(fe, buf, 2);
51 return r;
54 #endif /* STV0288_H */