Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * lnbp21.h - driver for lnb supply and control ic lnbp21
0004  *
0005  * Copyright (C) 2006 Oliver Endriss
0006  *
0007  * the project's page is at https://linuxtv.org
0008  */
0009 
0010 #ifndef _LNBP21_H
0011 #define _LNBP21_H
0012 
0013 /* system register bits */
0014 /* [RO] 0=OK; 1=over current limit flag */
0015 #define LNBP21_OLF  0x01
0016 /* [RO] 0=OK; 1=over temperature flag (150 C) */
0017 #define LNBP21_OTF  0x02
0018 /* [RW] 0=disable LNB power, enable loopthrough
0019     1=enable LNB power, disable loopthrough */
0020 #define LNBP21_EN   0x04
0021 /* [RW] 0=low voltage (13/14V, vert pol)
0022     1=high voltage (18/19V,horiz pol) */
0023 #define LNBP21_VSEL 0x08
0024 /* [RW] increase LNB voltage by 1V:
0025     0=13/18V; 1=14/19V */
0026 #define LNBP21_LLC  0x10
0027 /* [RW] 0=tone controlled by DSQIN pin
0028     1=tone enable, disable DSQIN */
0029 #define LNBP21_TEN  0x20
0030 /* [RW] current limit select:
0031     0:Iout=500-650mA Isc=300mA
0032     1:Iout=400-550mA Isc=200mA */
0033 #define LNBP21_ISEL 0x40
0034 /* [RW] short-circuit protect:
0035     0=pulsed (dynamic) curr limiting
0036     1=static curr limiting */
0037 #define LNBP21_PCL  0x80
0038 
0039 #include <linux/dvb/frontend.h>
0040 
0041 #if IS_REACHABLE(CONFIG_DVB_LNBP21)
0042 /* override_set and override_clear control which
0043  system register bits (above) to always set & clear */
0044 extern struct dvb_frontend *lnbp21_attach(struct dvb_frontend *fe,
0045                 struct i2c_adapter *i2c, u8 override_set,
0046                 u8 override_clear);
0047 #else
0048 static inline struct dvb_frontend *lnbp21_attach(struct dvb_frontend *fe,
0049                 struct i2c_adapter *i2c, u8 override_set,
0050                 u8 override_clear)
0051 {
0052     printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
0053     return NULL;
0054 }
0055 #endif
0056 
0057 #endif