1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * isl6421.h - driver for lnb supply and control ic ISL6421
4  *
5  * Copyright (C) 2006 Andrew de Quincey
6  * Copyright (C) 2006 Oliver Endriss
7  *
8  * the project's page is at https://linuxtv.org
9  */
10 
11 #ifndef _ISL6421_H
12 #define _ISL6421_H
13 
14 #include <linux/dvb/frontend.h>
15 
16 /* system register bits */
17 #define ISL6421_OLF1	0x01
18 #define ISL6421_EN1	0x02
19 #define ISL6421_VSEL1	0x04
20 #define ISL6421_LLC1	0x08
21 #define ISL6421_ENT1	0x10
22 #define ISL6421_ISEL1	0x20
23 #define ISL6421_DCL	0x40
24 
25 #if IS_REACHABLE(CONFIG_DVB_ISL6421)
26 /* override_set and override_clear control which system register bits (above) to always set & clear */
27 extern struct dvb_frontend *isl6421_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, u8 i2c_addr,
28 			  u8 override_set, u8 override_clear, bool override_tone);
29 #else
isl6421_attach(struct dvb_frontend * fe,struct i2c_adapter * i2c,u8 i2c_addr,u8 override_set,u8 override_clear,bool override_tone)30 static inline struct dvb_frontend *isl6421_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, u8 i2c_addr,
31 						  u8 override_set, u8 override_clear, bool override_tone)
32 {
33 	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
34 	return NULL;
35 }
36 #endif // CONFIG_DVB_ISL6421
37 
38 #endif
39