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