Commit | Line | Data |
---|---|---|
1802d0be | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
1ae2c589 MP |
2 | /** |
3 | * Driver for Sharp IX2505V (marked B0017) DVB-S silicon tuner | |
4 | * | |
5 | * Copyright (C) 2010 Malcolm Priestley | |
1ae2c589 MP |
6 | */ |
7 | ||
8 | #ifndef DVB_IX2505V_H | |
9 | #define DVB_IX2505V_H | |
10 | ||
11 | #include <linux/i2c.h> | |
fada1935 | 12 | #include <media/dvb_frontend.h> |
1ae2c589 | 13 | |
be9b53c8 MCC |
14 | /** |
15 | * struct ix2505v_config - ix2505 attachment configuration | |
16 | * | |
17 | * @tuner_address: tuner address | |
18 | * @tuner_gain: Baseband AMP gain control 0/1=0dB(default) 2=-2bB 3=-4dB | |
19 | * @tuner_chargepump: Charge pump output +/- 0=120 1=260 2=555 3=1200(default) | |
20 | * @min_delay_ms: delay after tune | |
21 | * @tuner_write_only: disables reads | |
22 | */ | |
1ae2c589 MP |
23 | struct ix2505v_config { |
24 | u8 tuner_address; | |
1ae2c589 | 25 | u8 tuner_gain; |
1ae2c589 | 26 | u8 tuner_chargepump; |
1ae2c589 | 27 | int min_delay_ms; |
1ae2c589 MP |
28 | u8 tuner_write_only; |
29 | ||
30 | }; | |
31 | ||
9b174527 | 32 | #if IS_REACHABLE(CONFIG_DVB_IX2505V) |
b95b0c98 MCC |
33 | /** |
34 | * Attach a ix2505v tuner to the supplied frontend structure. | |
35 | * | |
36 | * @fe: Frontend to attach to. | |
37 | * @config: pointer to &struct ix2505v_config | |
38 | * @i2c: pointer to &struct i2c_adapter. | |
39 | * | |
40 | * return: FE pointer on success, NULL on failure. | |
41 | */ | |
1ae2c589 MP |
42 | extern struct dvb_frontend *ix2505v_attach(struct dvb_frontend *fe, |
43 | const struct ix2505v_config *config, struct i2c_adapter *i2c); | |
44 | #else | |
45 | static inline struct dvb_frontend *ix2505v_attach(struct dvb_frontend *fe, | |
46 | const struct ix2505v_config *config, struct i2c_adapter *i2c) | |
47 | { | |
48 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); | |
49 | return NULL; | |
50 | } | |
51 | #endif | |
52 | ||
53 | #endif /* DVB_IX2505V_H */ |