treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / media / dvb-frontends / au8522.h
blob72e33285726f368f0bc3397ca6ee43f9da8997e6
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 Auvitek AU8522 QAM/8VSB demodulator driver
5 Copyright (C) 2008 Steven Toth <stoth@linuxtv.org>
8 */
10 #ifndef __AU8522_H__
11 #define __AU8522_H__
13 #include <linux/dvb/frontend.h>
15 enum au8522_if_freq {
16 AU8522_IF_6MHZ = 0,
17 AU8522_IF_4MHZ,
18 AU8522_IF_3_25MHZ,
21 struct au8522_led_config {
22 u16 vsb8_strong;
23 u16 qam64_strong;
24 u16 qam256_strong;
26 u16 gpio_output;
27 /* unset hi bits, set low bits */
28 u16 gpio_output_enable;
29 u16 gpio_output_disable;
31 u16 gpio_leds;
32 u8 *led_states;
33 unsigned int num_led_states;
36 struct au8522_config {
37 /* the demodulator's i2c address */
38 u8 demod_address;
40 /* Return lock status based on tuner lock, or demod lock */
41 #define AU8522_TUNERLOCKING 0
42 #define AU8522_DEMODLOCKING 1
43 u8 status_mode;
45 struct au8522_led_config *led_cfg;
47 enum au8522_if_freq vsb_if;
48 enum au8522_if_freq qam_if;
51 #if IS_REACHABLE(CONFIG_DVB_AU8522_DTV)
52 extern struct dvb_frontend *au8522_attach(const struct au8522_config *config,
53 struct i2c_adapter *i2c);
54 #else
55 static inline
56 struct dvb_frontend *au8522_attach(const struct au8522_config *config,
57 struct i2c_adapter *i2c)
59 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
60 return NULL;
62 #endif /* CONFIG_DVB_AU8522 */
64 /* Other modes may need to be added later */
65 enum au8522_video_input {
66 AU8522_COMPOSITE_CH1 = 1,
67 AU8522_COMPOSITE_CH2,
68 AU8522_COMPOSITE_CH3,
69 AU8522_COMPOSITE_CH4,
70 AU8522_COMPOSITE_CH4_SIF,
71 AU8522_SVIDEO_CH13,
72 AU8522_SVIDEO_CH24,
75 enum au8522_audio_input {
76 AU8522_AUDIO_NONE,
77 AU8522_AUDIO_SIF,
79 #endif /* __AU8522_H__ */