treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / media / tuners / mt2060.h
blobc4647a3d93f874e4de39c0f7699b0c4f93dcad84
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 * Driver for Microtune MT2060 "Single chip dual conversion broadband tuner"
5 * Copyright (c) 2006 Olivier DANET <odanet@caramail.com>
6 */
8 #ifndef MT2060_H
9 #define MT2060_H
11 struct dvb_frontend;
12 struct i2c_adapter;
15 * I2C address
16 * 0x60, ...
19 /**
20 * struct mt2060_platform_data - Platform data for the mt2060 driver
21 * @clock_out: Clock output setting. 0 = off, 1 = CLK/4, 2 = CLK/2, 3 = CLK/1.
22 * @if1: First IF used [MHz]. 0 defaults to 1220.
23 * @i2c_write_max: Maximum number of bytes I2C adapter can write at once.
24 * 0 defaults to maximum.
25 * @dvb_frontend: DVB frontend.
28 struct mt2060_platform_data {
29 u8 clock_out;
30 u16 if1;
31 unsigned int i2c_write_max:5;
32 struct dvb_frontend *dvb_frontend;
36 /* configuration struct for mt2060_attach() */
37 struct mt2060_config {
38 u8 i2c_address;
39 u8 clock_out; /* 0 = off, 1 = CLK/4, 2 = CLK/2, 3 = CLK/1 */
42 #if IS_REACHABLE(CONFIG_MEDIA_TUNER_MT2060)
43 extern struct dvb_frontend * mt2060_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct mt2060_config *cfg, u16 if1);
44 #else
45 static inline struct dvb_frontend * mt2060_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct mt2060_config *cfg, u16 if1)
47 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
48 return NULL;
50 #endif // CONFIG_MEDIA_TUNER_MT2060
52 #endif