1*a0c7056fSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */ 29a0bf528SMauro Carvalho Chehab /* 39a0bf528SMauro Carvalho Chehab * lnbp22.h - driver for lnb supply and control ic lnbp22 49a0bf528SMauro Carvalho Chehab * 59a0bf528SMauro Carvalho Chehab * Copyright (C) 2006 Dominik Kuhlen 69a0bf528SMauro Carvalho Chehab * Based on lnbp21.h 79a0bf528SMauro Carvalho Chehab * 8991ce92fSMauro Carvalho Chehab * the project's page is at https://linuxtv.org 99a0bf528SMauro Carvalho Chehab */ 109a0bf528SMauro Carvalho Chehab 119a0bf528SMauro Carvalho Chehab #ifndef _LNBP22_H 129a0bf528SMauro Carvalho Chehab #define _LNBP22_H 139a0bf528SMauro Carvalho Chehab 149a0bf528SMauro Carvalho Chehab /* Enable */ 159a0bf528SMauro Carvalho Chehab #define LNBP22_EN 0x10 169a0bf528SMauro Carvalho Chehab /* Voltage selection */ 179a0bf528SMauro Carvalho Chehab #define LNBP22_VSEL 0x02 189a0bf528SMauro Carvalho Chehab /* Plus 1 Volt Bit */ 199a0bf528SMauro Carvalho Chehab #define LNBP22_LLC 0x01 209a0bf528SMauro Carvalho Chehab 219a0bf528SMauro Carvalho Chehab #include <linux/dvb/frontend.h> 229a0bf528SMauro Carvalho Chehab 239b174527SArnd Bergmann #if IS_REACHABLE(CONFIG_DVB_LNBP22) 249a0bf528SMauro Carvalho Chehab /* 259a0bf528SMauro Carvalho Chehab * override_set and override_clear control which system register bits (above) 269a0bf528SMauro Carvalho Chehab * to always set & clear 279a0bf528SMauro Carvalho Chehab */ 289a0bf528SMauro Carvalho Chehab extern struct dvb_frontend *lnbp22_attach(struct dvb_frontend *fe, 299a0bf528SMauro Carvalho Chehab struct i2c_adapter *i2c); 309a0bf528SMauro Carvalho Chehab #else lnbp22_attach(struct dvb_frontend * fe,struct i2c_adapter * i2c)319a0bf528SMauro Carvalho Chehabstatic inline struct dvb_frontend *lnbp22_attach(struct dvb_frontend *fe, 329a0bf528SMauro Carvalho Chehab struct i2c_adapter *i2c) 339a0bf528SMauro Carvalho Chehab { 349a0bf528SMauro Carvalho Chehab printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 359a0bf528SMauro Carvalho Chehab return NULL; 369a0bf528SMauro Carvalho Chehab } 379a0bf528SMauro Carvalho Chehab #endif /* CONFIG_DVB_LNBP22 */ 389a0bf528SMauro Carvalho Chehab 399a0bf528SMauro Carvalho Chehab #endif /* _LNBP22_H */ 40