Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * lnbh25.c
0004  *
0005  * Driver for LNB supply and control IC LNBH25
0006  *
0007  * Copyright (C) 2014 NetUP Inc.
0008  * Copyright (C) 2014 Sergey Kozlov <serjk@netup.ru>
0009  * Copyright (C) 2014 Abylay Ospan <aospan@netup.ru>
0010  */
0011 
0012 #ifndef LNBH25_H
0013 #define LNBH25_H
0014 
0015 #include <linux/i2c.h>
0016 #include <linux/dvb/frontend.h>
0017 
0018 /* 22 kHz tone enabled. Tone output controlled by DSQIN pin */
0019 #define LNBH25_TEN  0x01
0020 /* Low power mode activated (used only with 22 kHz tone output disabled) */
0021 #define LNBH25_LPM  0x02
0022 /* DSQIN input pin is set to receive external 22 kHz TTL signal source */
0023 #define LNBH25_EXTM 0x04
0024 
0025 struct lnbh25_config {
0026     u8  i2c_address;
0027     u8  data2_config;
0028 };
0029 
0030 #if IS_REACHABLE(CONFIG_DVB_LNBH25)
0031 struct dvb_frontend *lnbh25_attach(
0032     struct dvb_frontend *fe,
0033     struct lnbh25_config *cfg,
0034     struct i2c_adapter *i2c);
0035 #else
0036 static inline struct dvb_frontend *lnbh25_attach(
0037     struct dvb_frontend *fe,
0038     struct lnbh25_config *cfg,
0039     struct i2c_adapter *i2c)
0040 {
0041     printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
0042     return NULL;
0043 }
0044 #endif
0045 
0046 #endif