]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - drivers/media/dvb-frontends/lnbp21.h
Merge branches 'for-4.11/upstream-fixes', 'for-4.12/accutouch', 'for-4.12/cp2112...
[mirror_ubuntu-bionic-kernel.git] / drivers / media / dvb-frontends / lnbp21.h
CommitLineData
2f27bdce
OE
1/*
2 * lnbp21.h - driver for lnb supply and control ic lnbp21
3 *
4 * Copyright (C) 2006 Oliver Endriss
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
bcb63314
SA
17 * To obtain the license, point your browser to
18 * http://www.gnu.org/copyleft/gpl.html
2f27bdce
OE
19 *
20 *
991ce92f 21 * the project's page is at https://linuxtv.org
2f27bdce
OE
22 */
23
24#ifndef _LNBP21_H
25#define _LNBP21_H
26
d020542f 27/* system register bits */
8c1a2331
IL
28/* [RO] 0=OK; 1=over current limit flag */
29#define LNBP21_OLF 0x01
30/* [RO] 0=OK; 1=over temperature flag (150 C) */
31#define LNBP21_OTF 0x02
32/* [RW] 0=disable LNB power, enable loopthrough
33 1=enable LNB power, disable loopthrough */
34#define LNBP21_EN 0x04
35/* [RW] 0=low voltage (13/14V, vert pol)
36 1=high voltage (18/19V,horiz pol) */
37#define LNBP21_VSEL 0x08
38/* [RW] increase LNB voltage by 1V:
39 0=13/18V; 1=14/19V */
40#define LNBP21_LLC 0x10
41/* [RW] 0=tone controlled by DSQIN pin
42 1=tone enable, disable DSQIN */
43#define LNBP21_TEN 0x20
44/* [RW] current limit select:
45 0:Iout=500-650mA Isc=300mA
46 1:Iout=400-550mA Isc=200mA */
47#define LNBP21_ISEL 0x40
48/* [RW] short-circuit protect:
49 0=pulsed (dynamic) curr limiting
50 1=static curr limiting */
51#define LNBP21_PCL 0x80
2f27bdce 52
d020542f 53#include <linux/dvb/frontend.h>
2f27bdce 54
9b174527 55#if IS_REACHABLE(CONFIG_DVB_LNBP21)
8c1a2331
IL
56/* override_set and override_clear control which
57 system register bits (above) to always set & clear */
58extern struct dvb_frontend *lnbp21_attach(struct dvb_frontend *fe,
59 struct i2c_adapter *i2c, u8 override_set,
60 u8 override_clear);
102a342b 61#else
8c1a2331
IL
62static inline struct dvb_frontend *lnbp21_attach(struct dvb_frontend *fe,
63 struct i2c_adapter *i2c, u8 override_set,
64 u8 override_clear)
102a342b 65{
271ddbf7 66 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
102a342b
AQ
67 return NULL;
68}
8c1a2331 69#endif
2f27bdce 70
8c1a2331 71#endif