58 lines · c
1/* SPDX-License-Identifier: GPL-2.0-or-later */2/*3 * horus3a.h4 *5 * Sony Horus3A DVB-S/S2 tuner driver6 *7 * Copyright 2012 Sony Corporation8 * Copyright (C) 2014 NetUP Inc.9 * Copyright (C) 2014 Sergey Kozlov <serjk@netup.ru>10 * Copyright (C) 2014 Abylay Ospan <aospan@netup.ru>11 */12 13#ifndef __DVB_HORUS3A_H__14#define __DVB_HORUS3A_H__15 16#include <linux/dvb/frontend.h>17#include <linux/i2c.h>18 19/**20 * struct horus3a_config - the configuration of Horus3A tuner driver21 * @i2c_address: I2C address of the tuner22 * @xtal_freq_mhz: Oscillator frequency, MHz23 * @set_tuner_priv: Callback function private context24 * @set_tuner_callback: Callback function that notifies the parent driver25 * which tuner is active now26 */27struct horus3a_config {28 u8 i2c_address;29 u8 xtal_freq_mhz;30 void *set_tuner_priv;31 int (*set_tuner_callback)(void *, int);32};33 34#if IS_REACHABLE(CONFIG_DVB_HORUS3A)35/**36 * horus3a_attach - Attach a horus3a tuner37 *38 * @fe: frontend to be attached39 * @config: pointer to &struct helene_config with tuner configuration.40 * @i2c: i2c adapter to use.41 *42 * return: FE pointer on success, NULL on failure.43 */44extern struct dvb_frontend *horus3a_attach(struct dvb_frontend *fe,45 const struct horus3a_config *config,46 struct i2c_adapter *i2c);47#else48static inline struct dvb_frontend *horus3a_attach(struct dvb_frontend *fe,49 const struct horus3a_config *config,50 struct i2c_adapter *i2c)51{52 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);53 return NULL;54}55#endif56 57#endif58