Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Driver for LNB supply and control IC STMicroelectronics LNBH29
0004  *
0005  * Copyright (c) 2018 Socionext Inc.
0006  */
0007 
0008 #ifndef LNBH29_H
0009 #define LNBH29_H
0010 
0011 #include <linux/i2c.h>
0012 #include <linux/dvb/frontend.h>
0013 
0014 /* Using very low E.S.R. capacitors or ceramic caps */
0015 #define LNBH29_DATA_COMP    BIT(3)
0016 
0017 struct lnbh29_config {
0018     u8 i2c_address;
0019     u8 data_config;
0020 };
0021 
0022 #if IS_REACHABLE(CONFIG_DVB_LNBH29)
0023 struct dvb_frontend *lnbh29_attach(struct dvb_frontend *fe,
0024                    struct lnbh29_config *cfg,
0025                    struct i2c_adapter *i2c);
0026 #else
0027 static inline struct dvb_frontend *lnbh29_attach(struct dvb_frontend *fe,
0028                          struct lnbh29_config *cfg,
0029                          struct i2c_adapter *i2c)
0030 {
0031     printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
0032     return NULL;
0033 }
0034 #endif
0035 
0036 #endif