]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - drivers/media/dvb-frontends/cxd2880/cxd2880.h
This is the driver for Sony CXD2880 DVB-T2/T tuner + demodulator. It includes the...
[mirror_ubuntu-artful-kernel.git] / drivers / media / dvb-frontends / cxd2880 / cxd2880.h
1 /*
2 * cxd2880.h
3 * Sony CXD2880 DVB-T2/T tuner + demodulator driver public definitions
4 *
5 * Copyright (C) 2016, 2017 Sony Semiconductor Solutions Corporation
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; version 2 of the License.
10 *
11 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
12 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
14 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
15 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
17 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
18 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
20 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21 *
22 * You should have received a copy of the GNU General Public License along
23 * with this program; if not, see <http://www.gnu.org/licenses/>.
24 */
25
26 #ifndef CXD2880_H
27 #define CXD2880_H
28
29 struct cxd2880_config {
30 struct spi_device *spi;
31 struct mutex *spi_mutex; /* For SPI access exclusive control */
32 };
33
34 #if IS_REACHABLE(CONFIG_DVB_CXD2880)
35 extern struct dvb_frontend *cxd2880_attach(struct dvb_frontend *fe,
36 struct cxd2880_config *cfg);
37 #else
38 static inline struct dvb_frontend *cxd2880_attach(struct dvb_frontend *fe,
39 struct cxd2880_config *cfg)
40 {
41 pr_warn("%s: driver disabled by Kconfig\n", __func__);
42 return NULL;
43 }
44 #endif /* CONFIG_DVB_CXD2880 */
45
46 #endif /* CXD2880_H */