]>
Commit | Line | Data |
---|---|---|
e025273b KS |
1 | /* |
2 | * lnbh25.c | |
3 | * | |
4 | * Driver for LNB supply and control IC LNBH25 | |
5 | * | |
6 | * Copyright (C) 2014 NetUP Inc. | |
7 | * Copyright (C) 2014 Sergey Kozlov <[email protected]> | |
8 | * Copyright (C) 2014 Abylay Ospan <[email protected]> | |
9 | * | |
10 | * This program is free software; you can redistribute it and/or modify | |
11 | * it under the terms of the GNU General Public License as published by | |
12 | * the Free Software Foundation; either version 2 of the License, or | |
13 | * (at your option) any later version. | |
14 | * | |
15 | * This program is distributed in the hope that it will be useful, | |
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | * GNU General Public License for more details. | |
19 | */ | |
20 | ||
21 | #ifndef LNBH25_H | |
22 | #define LNBH25_H | |
23 | ||
24 | #include <linux/i2c.h> | |
25 | #include <linux/kconfig.h> | |
26 | #include <linux/dvb/frontend.h> | |
27 | ||
28 | /* 22 kHz tone enabled. Tone output controlled by DSQIN pin */ | |
29 | #define LNBH25_TEN 0x01 | |
30 | /* Low power mode activated (used only with 22 kHz tone output disabled) */ | |
31 | #define LNBH25_LPM 0x02 | |
32 | /* DSQIN input pin is set to receive external 22 kHz TTL signal source */ | |
33 | #define LNBH25_EXTM 0x04 | |
34 | ||
35 | struct lnbh25_config { | |
36 | u8 i2c_address; | |
37 | u8 data2_config; | |
38 | }; | |
39 | ||
40 | #if IS_REACHABLE(CONFIG_DVB_LNBH25) | |
41 | struct dvb_frontend *lnbh25_attach( | |
42 | struct dvb_frontend *fe, | |
43 | struct lnbh25_config *cfg, | |
44 | struct i2c_adapter *i2c); | |
45 | #else | |
a9c4e5cf | 46 | static inline struct dvb_frontend *lnbh25_attach( |
e025273b KS |
47 | struct dvb_frontend *fe, |
48 | struct lnbh25_config *cfg, | |
49 | struct i2c_adapter *i2c) | |
50 | { | |
51 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); | |
52 | return NULL; | |
53 | } | |
54 | #endif | |
55 | ||
56 | #endif |