aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends
diff options
context:
space:
mode:
authorManu Abraham <abraham.manu@gmail.com>2007-09-22 20:28:11 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-29 14:53:15 -0500
commit41e1151b33cce7e19cfba1648d05abd34a0ba492 (patch)
tree14bf8c6d7bc2b0cf704690621d7e15a835d4a18c /drivers/media/dvb/frontends
parent0b8f15dcebb58ef8956203803c6de8f41a173dbc (diff)
V4L/DVB (9395): Add initial support for two KNC1 DVB-S2 boards
Add initial support for: * KNC1 DVB-S2 Plus * KNC1 DVB-S2 OEM (known as Satelco DVB-S2) Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends')
-rw-r--r--drivers/media/dvb/frontends/tda8261.c14
-rw-r--r--drivers/media/dvb/frontends/tda8261.h9
2 files changed, 10 insertions, 13 deletions
diff --git a/drivers/media/dvb/frontends/tda8261.c b/drivers/media/dvb/frontends/tda8261.c
index 616d88b07158..1b3d491445af 100644
--- a/drivers/media/dvb/frontends/tda8261.c
+++ b/drivers/media/dvb/frontends/tda8261.c
@@ -26,9 +26,9 @@
26#include "tda8261.h" 26#include "tda8261.h"
27 27
28struct tda8261_state { 28struct tda8261_state {
29 struct dvb_frontend *fe; 29 struct dvb_frontend *fe;
30 struct i2c_adapter *i2c; 30 struct i2c_adapter *i2c;
31 struct tda8261_config *config; 31 const struct tda8261_config *config;
32 32
33 /* state cache */ 33 /* state cache */
34 u32 frequency; 34 u32 frequency;
@@ -37,7 +37,7 @@ struct tda8261_state {
37 37
38static int tda8261_read(struct tda8261_state *state, u8 *buf) 38static int tda8261_read(struct tda8261_state *state, u8 *buf)
39{ 39{
40 struct tda8261_config *config = state->config; 40 const struct tda8261_config *config = state->config;
41 int err = 0; 41 int err = 0;
42 struct i2c_msg msg[] = { 42 struct i2c_msg msg[] = {
43 { .addr = config->addr, .flags = 0, .buf = NULL, .len = 0 }, 43 { .addr = config->addr, .flags = 0, .buf = NULL, .len = 0 },
@@ -52,7 +52,7 @@ static int tda8261_read(struct tda8261_state *state, u8 *buf)
52 52
53static int tda8261_write(struct tda8261_state *state, u8 *buf) 53static int tda8261_write(struct tda8261_state *state, u8 *buf)
54{ 54{
55 struct tda8261_config *config = state->config; 55 const struct tda8261_config *config = state->config;
56 int err = 0; 56 int err = 0;
57 struct i2c_msg msg = { .addr = config->addr, .flags = 0, .buf = buf, .len = 4 }; 57 struct i2c_msg msg = { .addr = config->addr, .flags = 0, .buf = buf, .len = 4 };
58 58
@@ -111,7 +111,7 @@ static int tda8261_set_state(struct dvb_frontend *fe,
111 struct tuner_state *tstate) 111 struct tuner_state *tstate)
112{ 112{
113 struct tda8261_state *state = fe->tuner_priv; 113 struct tda8261_state *state = fe->tuner_priv;
114 struct tda8261_config *config = state->config; 114 const struct tda8261_config *config = state->config;
115 u32 frequency, N, status = 0; 115 u32 frequency, N, status = 0;
116 u8 buf[4]; 116 u8 buf[4];
117 int err = 0; 117 int err = 0;
@@ -182,7 +182,7 @@ static struct dvb_tuner_ops tda8261_ops = {
182}; 182};
183 183
184struct dvb_frontend *tda8261_attach(struct dvb_frontend *fe, 184struct dvb_frontend *tda8261_attach(struct dvb_frontend *fe,
185 struct tda8261_config *config, 185 const struct tda8261_config *config,
186 struct i2c_adapter *i2c) 186 struct i2c_adapter *i2c)
187{ 187{
188 struct tda8261_state *state = NULL; 188 struct tda8261_state *state = NULL;
diff --git a/drivers/media/dvb/frontends/tda8261.h b/drivers/media/dvb/frontends/tda8261.h
index b8d8e37b045b..1381d8e22a83 100644
--- a/drivers/media/dvb/frontends/tda8261.h
+++ b/drivers/media/dvb/frontends/tda8261.h
@@ -15,11 +15,8 @@ struct tda8261_config {
15 enum tda8261_step step_size; 15 enum tda8261_step step_size;
16}; 16};
17 17
18/* move out from here! */ 18extern struct dvb_frontend *tda8261_attach(struct dvb_frontend *fe,
19static const struct tda8261_config sd1878c_config = { 19 const struct tda8261_config *config,
20// .name = "SD1878C", 20 struct i2c_adapter *i2c);
21 .addr = 0x60,
22 .step_size = TDA8261_STEP_1000 /* kHz */
23};
24 21
25#endif// __TDA8261_H 22#endif// __TDA8261_H