[media] dvb-frontends/cxd2841er: replace IFFREQ calc macros into functions
[linux-2.6-block.git] / drivers / media / dvb-frontends / cxd2841er.h
CommitLineData
a6dc60ff
KS
1/*
2 * cxd2841er.h
3 *
4 * Sony CXD2441ER digital demodulator driver public definitions
5 *
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>
10 *
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.
15 *
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.
20 */
21
22#ifndef CXD2841ER_H
23#define CXD2841ER_H
24
a6dc60ff
KS
25#include <linux/dvb/frontend.h>
26
83808c23
AO
27enum cxd2841er_xtal {
28 SONY_XTAL_20500, /* 20.5 MHz */
29 SONY_XTAL_24000, /* 24 MHz */
30 SONY_XTAL_41000 /* 41 MHz */
31};
32
a6dc60ff
KS
33struct cxd2841er_config {
34 u8 i2c_addr;
83808c23 35 enum cxd2841er_xtal xtal;
a6dc60ff
KS
36};
37
38#if IS_REACHABLE(CONFIG_DVB_CXD2841ER)
39extern struct dvb_frontend *cxd2841er_attach_s(struct cxd2841er_config *cfg,
40 struct i2c_adapter *i2c);
41
3f3b48a0 42extern struct dvb_frontend *cxd2841er_attach_t_c(struct cxd2841er_config *cfg,
a6dc60ff 43 struct i2c_adapter *i2c);
a6dc60ff
KS
44#else
45static inline struct dvb_frontend *cxd2841er_attach_s(
46 struct cxd2841er_config *cfg,
47 struct i2c_adapter *i2c)
48{
83808c23 49 pr_warn("%s: driver disabled by Kconfig\n", __func__);
a6dc60ff
KS
50 return NULL;
51}
52
3f3b48a0 53static inline struct dvb_frontend *cxd2841er_attach_t_c(
83808c23
AO
54 struct cxd2841er_config *cfg, struct i2c_adapter *i2c)
55{
56 pr_warn("%s: driver disabled by Kconfig\n", __func__);
a6dc60ff
KS
57 return NULL;
58}
83808c23 59
a6dc60ff
KS
60#endif
61
62#endif