1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Driver for LNB supply and control IC STMicroelectronics LNBH29
4  *
5  * Copyright (c) 2018 Socionext Inc.
6  */
7 
8 #ifndef LNBH29_H
9 #define LNBH29_H
10 
11 #include <linux/i2c.h>
12 #include <linux/dvb/frontend.h>
13 
14 /* Using very low E.S.R. capacitors or ceramic caps */
15 #define LNBH29_DATA_COMP    BIT(3)
16 
17 struct lnbh29_config {
18 	u8 i2c_address;
19 	u8 data_config;
20 };
21 
22 #if IS_REACHABLE(CONFIG_DVB_LNBH29)
23 struct dvb_frontend *lnbh29_attach(struct dvb_frontend *fe,
24 				   struct lnbh29_config *cfg,
25 				   struct i2c_adapter *i2c);
26 #else
lnbh29_attach(struct dvb_frontend * fe,struct lnbh29_config * cfg,struct i2c_adapter * i2c)27 static inline struct dvb_frontend *lnbh29_attach(struct dvb_frontend *fe,
28 						 struct lnbh29_config *cfg,
29 						 struct i2c_adapter *i2c)
30 {
31 	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
32 	return NULL;
33 }
34 #endif
35 
36 #endif
37