Thomas Gleixner | c942fdd | 2019-05-27 08:55:06 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Kozlov Sergey | e025273 | 2015-07-28 11:33:02 -0300 | [diff] [blame] | 2 | /* |
| 3 | * lnbh25.c |
| 4 | * |
| 5 | * Driver for LNB supply and control IC LNBH25 |
| 6 | * |
| 7 | * Copyright (C) 2014 NetUP Inc. |
| 8 | * Copyright (C) 2014 Sergey Kozlov <serjk@netup.ru> |
| 9 | * Copyright (C) 2014 Abylay Ospan <aospan@netup.ru> |
Kozlov Sergey | e025273 | 2015-07-28 11:33:02 -0300 | [diff] [blame] | 10 | */ |
| 11 | |
| 12 | #ifndef LNBH25_H |
| 13 | #define LNBH25_H |
| 14 | |
| 15 | #include <linux/i2c.h> |
Kozlov Sergey | e025273 | 2015-07-28 11:33:02 -0300 | [diff] [blame] | 16 | #include <linux/dvb/frontend.h> |
| 17 | |
| 18 | /* 22 kHz tone enabled. Tone output controlled by DSQIN pin */ |
| 19 | #define LNBH25_TEN 0x01 |
| 20 | /* Low power mode activated (used only with 22 kHz tone output disabled) */ |
| 21 | #define LNBH25_LPM 0x02 |
| 22 | /* DSQIN input pin is set to receive external 22 kHz TTL signal source */ |
| 23 | #define LNBH25_EXTM 0x04 |
| 24 | |
| 25 | struct lnbh25_config { |
| 26 | u8 i2c_address; |
| 27 | u8 data2_config; |
| 28 | }; |
| 29 | |
| 30 | #if IS_REACHABLE(CONFIG_DVB_LNBH25) |
| 31 | struct dvb_frontend *lnbh25_attach( |
| 32 | struct dvb_frontend *fe, |
| 33 | struct lnbh25_config *cfg, |
| 34 | struct i2c_adapter *i2c); |
| 35 | #else |
Javier Martinez Canillas | a9c4e5c | 2015-09-13 19:45:21 -0300 | [diff] [blame] | 36 | static inline struct dvb_frontend *lnbh25_attach( |
Kozlov Sergey | e025273 | 2015-07-28 11:33:02 -0300 | [diff] [blame] | 37 | struct dvb_frontend *fe, |
| 38 | struct lnbh25_config *cfg, |
| 39 | struct i2c_adapter *i2c) |
| 40 | { |
| 41 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); |
| 42 | return NULL; |
| 43 | } |
| 44 | #endif |
| 45 | |
| 46 | #endif |