Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / drivers / media / dvb-frontends / ascot2e.h
blob418c565baf83ff04b0037e60eb6f4a08b1de859a
1 /*
2 * ascot2e.h
4 * Sony Ascot3E DVB-T/T2/C/C2 tuner driver
6 * Copyright 2012 Sony Corporation
7 * Copyright (C) 2014 NetUP Inc.
8 * Copyright (C) 2014 Sergey Kozlov <serjk@netup.ru>
9 * Copyright (C) 2014 Abylay Ospan <aospan@netup.ru>
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
22 #ifndef __DVB_ASCOT2E_H__
23 #define __DVB_ASCOT2E_H__
25 #include <linux/dvb/frontend.h>
26 #include <linux/i2c.h>
28 /**
29 * struct ascot2e_config - the configuration of Ascot2E tuner driver
30 * @i2c_address: I2C address of the tuner
31 * @xtal_freq_mhz: Oscillator frequency, MHz
32 * @set_tuner_priv: Callback function private context
33 * @set_tuner_callback: Callback function that notifies the parent driver
34 * which tuner is active now
36 struct ascot2e_config {
37 u8 i2c_address;
38 u8 xtal_freq_mhz;
39 void *set_tuner_priv;
40 int (*set_tuner_callback)(void *, int);
43 #if IS_REACHABLE(CONFIG_DVB_ASCOT2E)
44 /**
45 * Attach an ascot2e tuner
47 * @fe: frontend to be attached
48 * @config: pointer to &struct ascot2e_config with tuner configuration.
49 * @i2c: i2c adapter to use.
51 * return: FE pointer on success, NULL on failure.
53 extern struct dvb_frontend *ascot2e_attach(struct dvb_frontend *fe,
54 const struct ascot2e_config *config,
55 struct i2c_adapter *i2c);
56 #else
57 static inline struct dvb_frontend *ascot2e_attach(struct dvb_frontend *fe,
58 const struct ascot2e_config *config,
59 struct i2c_adapter *i2c)
61 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
62 return NULL;
64 #endif
66 #endif