Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  *   Fujitsu mb86a20s driver
0004  *
0005  *   Copyright (C) 2010 Mauro Carvalho Chehab
0006  */
0007 
0008 #ifndef MB86A20S_H
0009 #define MB86A20S_H
0010 
0011 #include <linux/dvb/frontend.h>
0012 
0013 /**
0014  * struct mb86a20s_config - Define the per-device attributes of the frontend
0015  *
0016  * @fclk:       Clock frequency. If zero, assumes the default
0017  *          (32.57142 Mhz)
0018  * @demod_address:  the demodulator's i2c address
0019  * @is_serial:      if true, TS is serial. Otherwise, TS is parallel
0020  */
0021 struct mb86a20s_config {
0022     u32 fclk;
0023     u8  demod_address;
0024     bool    is_serial;
0025 };
0026 
0027 #if IS_REACHABLE(CONFIG_DVB_MB86A20S)
0028 /**
0029  * mb86a20s_attach - Attach a mb86a20s demod
0030  *
0031  * @config: pointer to &struct mb86a20s_config with demod configuration.
0032  * @i2c: i2c adapter to use.
0033  *
0034  * return: FE pointer on success, NULL on failure.
0035  */
0036 extern struct dvb_frontend *mb86a20s_attach(const struct mb86a20s_config *config,
0037                        struct i2c_adapter *i2c);
0038 
0039 #else
0040 static inline struct dvb_frontend *mb86a20s_attach(
0041     const struct mb86a20s_config *config, struct i2c_adapter *i2c)
0042 {
0043     printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
0044     return NULL;
0045 }
0046 #endif
0047 
0048 #endif /* MB86A20S */