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 <serjk@netup.ru> 8 * Copyright (C) 2014 Abylay Ospan <aospan@netup.ru> 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/dvb/frontend.h> 26 27 /* 22 kHz tone enabled. Tone output controlled by DSQIN pin */ 28 #define LNBH25_TEN 0x01 29 /* Low power mode activated (used only with 22 kHz tone output disabled) */ 30 #define LNBH25_LPM 0x02 31 /* DSQIN input pin is set to receive external 22 kHz TTL signal source */ 32 #define LNBH25_EXTM 0x04 33 34 struct lnbh25_config { 35 u8 i2c_address; 36 u8 data2_config; 37 }; 38 39 #if IS_REACHABLE(CONFIG_DVB_LNBH25) 40 struct dvb_frontend *lnbh25_attach( 41 struct dvb_frontend *fe, 42 struct lnbh25_config *cfg, 43 struct i2c_adapter *i2c); 44 #else 45 static inline struct dvb_frontend *lnbh25_attach( 46 struct dvb_frontend *fe, 47 struct lnbh25_config *cfg, 48 struct i2c_adapter *i2c) 49 { 50 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 51 return NULL; 52 } 53 #endif 54 55 #endif 56