19a0bf528SMauro Carvalho Chehab /* 29a0bf528SMauro Carvalho Chehab * isl6421.h - driver for lnb supply and control ic ISL6421 39a0bf528SMauro Carvalho Chehab * 49a0bf528SMauro Carvalho Chehab * Copyright (C) 2006 Andrew de Quincey 59a0bf528SMauro Carvalho Chehab * Copyright (C) 2006 Oliver Endriss 69a0bf528SMauro Carvalho Chehab * 79a0bf528SMauro Carvalho Chehab * This program is free software; you can redistribute it and/or 89a0bf528SMauro Carvalho Chehab * modify it under the terms of the GNU General Public License 99a0bf528SMauro Carvalho Chehab * as published by the Free Software Foundation; either version 2 109a0bf528SMauro Carvalho Chehab * of the License, or (at your option) any later version. 119a0bf528SMauro Carvalho Chehab * 129a0bf528SMauro Carvalho Chehab * 139a0bf528SMauro Carvalho Chehab * This program is distributed in the hope that it will be useful, 149a0bf528SMauro Carvalho Chehab * but WITHOUT ANY WARRANTY; without even the implied warranty of 159a0bf528SMauro Carvalho Chehab * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 169a0bf528SMauro Carvalho Chehab * GNU General Public License for more details. 179a0bf528SMauro Carvalho Chehab * 189a0bf528SMauro Carvalho Chehab * 199a0bf528SMauro Carvalho Chehab * You should have received a copy of the GNU General Public License 209a0bf528SMauro Carvalho Chehab * along with this program; if not, write to the Free Software 219a0bf528SMauro Carvalho Chehab * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 229a0bf528SMauro Carvalho Chehab * Or, point your browser to http://www.gnu.org/copyleft/gpl.html 239a0bf528SMauro Carvalho Chehab * 249a0bf528SMauro Carvalho Chehab * 259a0bf528SMauro Carvalho Chehab * the project's page is at http://www.linuxtv.org 269a0bf528SMauro Carvalho Chehab */ 279a0bf528SMauro Carvalho Chehab 289a0bf528SMauro Carvalho Chehab #ifndef _ISL6421_H 299a0bf528SMauro Carvalho Chehab #define _ISL6421_H 309a0bf528SMauro Carvalho Chehab 319a0bf528SMauro Carvalho Chehab #include <linux/dvb/frontend.h> 329a0bf528SMauro Carvalho Chehab 339a0bf528SMauro Carvalho Chehab /* system register bits */ 349a0bf528SMauro Carvalho Chehab #define ISL6421_OLF1 0x01 359a0bf528SMauro Carvalho Chehab #define ISL6421_EN1 0x02 369a0bf528SMauro Carvalho Chehab #define ISL6421_VSEL1 0x04 379a0bf528SMauro Carvalho Chehab #define ISL6421_LLC1 0x08 389a0bf528SMauro Carvalho Chehab #define ISL6421_ENT1 0x10 399a0bf528SMauro Carvalho Chehab #define ISL6421_ISEL1 0x20 409a0bf528SMauro Carvalho Chehab #define ISL6421_DCL 0x40 419a0bf528SMauro Carvalho Chehab 427b34be71SPeter Senna Tschudin #if IS_ENABLED(CONFIG_DVB_ISL6421) 439a0bf528SMauro Carvalho Chehab /* override_set and override_clear control which system register bits (above) to always set & clear */ 449a0bf528SMauro Carvalho Chehab extern struct dvb_frontend *isl6421_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, u8 i2c_addr, 4548a8a03bSMauro Carvalho Chehab u8 override_set, u8 override_clear, bool override_tone); 469a0bf528SMauro Carvalho Chehab #else 479a0bf528SMauro Carvalho Chehab static inline struct dvb_frontend *isl6421_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, u8 i2c_addr, 4848a8a03bSMauro Carvalho Chehab u8 override_set, u8 override_clear, bool override_tone) 499a0bf528SMauro Carvalho Chehab { 509a0bf528SMauro Carvalho Chehab printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 519a0bf528SMauro Carvalho Chehab return NULL; 529a0bf528SMauro Carvalho Chehab } 539a0bf528SMauro Carvalho Chehab #endif // CONFIG_DVB_ISL6421 549a0bf528SMauro Carvalho Chehab 559a0bf528SMauro Carvalho Chehab #endif 56