Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * isl6405.h - driver for dual lnb supply and control ic ISL6405
0004  *
0005  * Copyright (C) 2008 Hartmut Hackmann
0006  * Copyright (C) 2006 Oliver Endriss
0007  *
0008  * the project's page is at https://linuxtv.org
0009  */
0010 
0011 #ifndef _ISL6405_H
0012 #define _ISL6405_H
0013 
0014 #include <linux/dvb/frontend.h>
0015 
0016 /* system register bits */
0017 
0018 /* this bit selects register (control) 1 or 2
0019    note that the bit maps are different */
0020 
0021 #define ISL6405_SR  0x80
0022 
0023 /* SR = 0 */
0024 #define ISL6405_OLF1    0x01
0025 #define ISL6405_EN1 0x02
0026 #define ISL6405_VSEL1   0x04
0027 #define ISL6405_LLC1    0x08
0028 #define ISL6405_ENT1    0x10
0029 #define ISL6405_ISEL1   0x20
0030 #define ISL6405_DCL 0x40
0031 
0032 /* SR = 1 */
0033 #define ISL6405_OLF2    0x01
0034 #define ISL6405_OTF 0x02
0035 #define ISL6405_EN2 0x04
0036 #define ISL6405_VSEL2   0x08
0037 #define ISL6405_LLC2    0x10
0038 #define ISL6405_ENT2    0x20
0039 #define ISL6405_ISEL2   0x40
0040 
0041 #if IS_REACHABLE(CONFIG_DVB_ISL6405)
0042 /* override_set and override_clear control which system register bits (above)
0043  * to always set & clear
0044  */
0045 extern struct dvb_frontend *isl6405_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c,
0046                        u8 i2c_addr, u8 override_set, u8 override_clear);
0047 #else
0048 static inline struct dvb_frontend *isl6405_attach(struct dvb_frontend *fe,
0049                           struct i2c_adapter *i2c, u8 i2c_addr,
0050                           u8 override_set, u8 override_clear)
0051 {
0052     printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
0053     return NULL;
0054 }
0055 #endif /* CONFIG_DVB_ISL6405 */
0056 
0057 #endif