1*9a0bf528SMauro Carvalho Chehab /* 2*9a0bf528SMauro Carvalho Chehab * lnbp22.h - driver for lnb supply and control ic lnbp22 3*9a0bf528SMauro Carvalho Chehab * 4*9a0bf528SMauro Carvalho Chehab * Copyright (C) 2006 Dominik Kuhlen 5*9a0bf528SMauro Carvalho Chehab * Based on lnbp21.h 6*9a0bf528SMauro Carvalho Chehab * 7*9a0bf528SMauro Carvalho Chehab * This program is free software; you can redistribute it and/or 8*9a0bf528SMauro Carvalho Chehab * modify it under the terms of the GNU General Public License 9*9a0bf528SMauro Carvalho Chehab * as published by the Free Software Foundation; either version 2 10*9a0bf528SMauro Carvalho Chehab * of the License, or (at your option) any later version. 11*9a0bf528SMauro Carvalho Chehab * 12*9a0bf528SMauro Carvalho Chehab * 13*9a0bf528SMauro Carvalho Chehab * This program is distributed in the hope that it will be useful, 14*9a0bf528SMauro Carvalho Chehab * but WITHOUT ANY WARRANTY; without even the implied warranty of 15*9a0bf528SMauro Carvalho Chehab * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16*9a0bf528SMauro Carvalho Chehab * GNU General Public License for more details. 17*9a0bf528SMauro Carvalho Chehab * 18*9a0bf528SMauro Carvalho Chehab * 19*9a0bf528SMauro Carvalho Chehab * You should have received a copy of the GNU General Public License 20*9a0bf528SMauro Carvalho Chehab * along with this program; if not, write to the Free Software 21*9a0bf528SMauro Carvalho Chehab * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 22*9a0bf528SMauro Carvalho Chehab * Or, point your browser to http://www.gnu.org/copyleft/gpl.html 23*9a0bf528SMauro Carvalho Chehab * 24*9a0bf528SMauro Carvalho Chehab * 25*9a0bf528SMauro Carvalho Chehab * the project's page is at http://www.linuxtv.org 26*9a0bf528SMauro Carvalho Chehab */ 27*9a0bf528SMauro Carvalho Chehab 28*9a0bf528SMauro Carvalho Chehab #ifndef _LNBP22_H 29*9a0bf528SMauro Carvalho Chehab #define _LNBP22_H 30*9a0bf528SMauro Carvalho Chehab 31*9a0bf528SMauro Carvalho Chehab /* Enable */ 32*9a0bf528SMauro Carvalho Chehab #define LNBP22_EN 0x10 33*9a0bf528SMauro Carvalho Chehab /* Voltage selection */ 34*9a0bf528SMauro Carvalho Chehab #define LNBP22_VSEL 0x02 35*9a0bf528SMauro Carvalho Chehab /* Plus 1 Volt Bit */ 36*9a0bf528SMauro Carvalho Chehab #define LNBP22_LLC 0x01 37*9a0bf528SMauro Carvalho Chehab 38*9a0bf528SMauro Carvalho Chehab #include <linux/dvb/frontend.h> 39*9a0bf528SMauro Carvalho Chehab 40*9a0bf528SMauro Carvalho Chehab #if defined(CONFIG_DVB_LNBP22) || \ 41*9a0bf528SMauro Carvalho Chehab (defined(CONFIG_DVB_LNBP22_MODULE) && defined(MODULE)) 42*9a0bf528SMauro Carvalho Chehab /* 43*9a0bf528SMauro Carvalho Chehab * override_set and override_clear control which system register bits (above) 44*9a0bf528SMauro Carvalho Chehab * to always set & clear 45*9a0bf528SMauro Carvalho Chehab */ 46*9a0bf528SMauro Carvalho Chehab extern struct dvb_frontend *lnbp22_attach(struct dvb_frontend *fe, 47*9a0bf528SMauro Carvalho Chehab struct i2c_adapter *i2c); 48*9a0bf528SMauro Carvalho Chehab #else 49*9a0bf528SMauro Carvalho Chehab static inline struct dvb_frontend *lnbp22_attach(struct dvb_frontend *fe, 50*9a0bf528SMauro Carvalho Chehab struct i2c_adapter *i2c) 51*9a0bf528SMauro Carvalho Chehab { 52*9a0bf528SMauro Carvalho Chehab printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 53*9a0bf528SMauro Carvalho Chehab return NULL; 54*9a0bf528SMauro Carvalho Chehab } 55*9a0bf528SMauro Carvalho Chehab #endif /* CONFIG_DVB_LNBP22 */ 56*9a0bf528SMauro Carvalho Chehab 57*9a0bf528SMauro Carvalho Chehab #endif /* _LNBP22_H */ 58