Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * horus3a.h
0004  *
0005  * Sony Horus3A DVB-S/S2 tuner driver
0006  *
0007  * Copyright 2012 Sony Corporation
0008  * Copyright (C) 2014 NetUP Inc.
0009  * Copyright (C) 2014 Sergey Kozlov <serjk@netup.ru>
0010  * Copyright (C) 2014 Abylay Ospan <aospan@netup.ru>
0011   */
0012 
0013 #ifndef __DVB_HORUS3A_H__
0014 #define __DVB_HORUS3A_H__
0015 
0016 #include <linux/dvb/frontend.h>
0017 #include <linux/i2c.h>
0018 
0019 /**
0020  * struct horus3a_config - the configuration of Horus3A tuner driver
0021  * @i2c_address:    I2C address of the tuner
0022  * @xtal_freq_mhz:  Oscillator frequency, MHz
0023  * @set_tuner_priv: Callback function private context
0024  * @set_tuner_callback: Callback function that notifies the parent driver
0025  *          which tuner is active now
0026  */
0027 struct horus3a_config {
0028     u8  i2c_address;
0029     u8  xtal_freq_mhz;
0030     void    *set_tuner_priv;
0031     int (*set_tuner_callback)(void *, int);
0032 };
0033 
0034 #if IS_REACHABLE(CONFIG_DVB_HORUS3A)
0035 /**
0036  * horus3a_attach - Attach a horus3a tuner
0037  *
0038  * @fe: frontend to be attached
0039  * @config: pointer to &struct helene_config with tuner configuration.
0040  * @i2c: i2c adapter to use.
0041  *
0042  * return: FE pointer on success, NULL on failure.
0043  */
0044 extern struct dvb_frontend *horus3a_attach(struct dvb_frontend *fe,
0045                     const struct horus3a_config *config,
0046                     struct i2c_adapter *i2c);
0047 #else
0048 static inline struct dvb_frontend *horus3a_attach(struct dvb_frontend *fe,
0049                     const struct horus3a_config *config,
0050                     struct i2c_adapter *i2c)
0051 {
0052     printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
0053     return NULL;
0054 }
0055 #endif
0056 
0057 #endif