diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-24 12:44:38 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-29 14:53:13 -0500 |
commit | c2e591fcb7aa5300cf6967edb29960628cf1831d (patch) | |
tree | fc334916c6b90395ad1583c2b8638116284a54f8 /drivers | |
parent | 67ea14f250c295486baa3440ca85be0b032fda95 (diff) |
V4L/DVB (9366): Move S921 driver to the proper place and allow it to compile
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb/frontends/Kconfig | 11 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/Makefile | 3 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/s921_core.c (renamed from drivers/media/video/empia/sharp/s921_core.c) | 85 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/s921_core.h (renamed from drivers/media/video/empia/sharp/s921_core.h) | 0 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/s921_module.c (renamed from drivers/media/video/empia/sharp/s921_module.c) | 22 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/s921_module.h (renamed from drivers/media/video/empia/sharp/s921_module.h) | 0 | ||||
-rw-r--r-- | drivers/media/video/empia/sharp/Makefile | 3 |
7 files changed, 68 insertions, 56 deletions
diff --git a/drivers/media/dvb/frontends/Kconfig b/drivers/media/dvb/frontends/Kconfig index 96b93e21a84b..8da1e81668e7 100644 --- a/drivers/media/dvb/frontends/Kconfig +++ b/drivers/media/dvb/frontends/Kconfig | |||
@@ -369,6 +369,17 @@ config DVB_S5H1411 | |||
369 | An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want | 369 | An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want |
370 | to support this frontend. | 370 | to support this frontend. |
371 | 371 | ||
372 | comment "ISDB-T (terrestrial) frontends" | ||
373 | depends on DVB_CORE | ||
374 | |||
375 | config DVB_S921 | ||
376 | tristate "Sharp S921 tuner" | ||
377 | depends on DVB_CORE && I2C | ||
378 | default m if DVB_FE_CUSTOMISE | ||
379 | help | ||
380 | AN ISDB-T DQPSK, QPSK, 16QAM and 64QAM 1seg tuner module. | ||
381 | Say Y when you want to support this frontend. | ||
382 | |||
372 | comment "Digital terrestrial only tuners/PLL" | 383 | comment "Digital terrestrial only tuners/PLL" |
373 | depends on DVB_CORE | 384 | depends on DVB_CORE |
374 | 385 | ||
diff --git a/drivers/media/dvb/frontends/Makefile b/drivers/media/dvb/frontends/Makefile index aba79f4a63a7..11a5407ecdb7 100644 --- a/drivers/media/dvb/frontends/Makefile +++ b/drivers/media/dvb/frontends/Makefile | |||
@@ -5,6 +5,8 @@ | |||
5 | EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ | 5 | EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ |
6 | EXTRA_CFLAGS += -Idrivers/media/common/tuners/ | 6 | EXTRA_CFLAGS += -Idrivers/media/common/tuners/ |
7 | 7 | ||
8 | s921-objs := s921_module.o s921_core.o | ||
9 | |||
8 | obj-$(CONFIG_DVB_PLL) += dvb-pll.o | 10 | obj-$(CONFIG_DVB_PLL) += dvb-pll.o |
9 | obj-$(CONFIG_DVB_STV0299) += stv0299.o | 11 | obj-$(CONFIG_DVB_STV0299) += stv0299.o |
10 | obj-$(CONFIG_DVB_SP8870) += sp8870.o | 12 | obj-$(CONFIG_DVB_SP8870) += sp8870.o |
@@ -55,3 +57,4 @@ obj-$(CONFIG_DVB_CX24116) += cx24116.o | |||
55 | obj-$(CONFIG_DVB_SI21XX) += si21xx.o | 57 | obj-$(CONFIG_DVB_SI21XX) += si21xx.o |
56 | obj-$(CONFIG_DVB_STV0288) += stv0288.o | 58 | obj-$(CONFIG_DVB_STV0288) += stv0288.o |
57 | obj-$(CONFIG_DVB_STB6000) += stb6000.o | 59 | obj-$(CONFIG_DVB_STB6000) += stb6000.o |
60 | obj-$(CONFIG_DVB_S921) += s921.o | ||
diff --git a/drivers/media/video/empia/sharp/s921_core.c b/drivers/media/dvb/frontends/s921_core.c index 01a7caebc0e9..974b52be9aea 100644 --- a/drivers/media/video/empia/sharp/s921_core.c +++ b/drivers/media/dvb/frontends/s921_core.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/delay.h> | ||
11 | #include "s921_core.h" | 12 | #include "s921_core.h" |
12 | 13 | ||
13 | static int s921_isdb_init(struct s921_isdb_t *dev); | 14 | static int s921_isdb_init(struct s921_isdb_t *dev); |
@@ -16,49 +17,49 @@ static int s921_isdb_tune(struct s921_isdb_t *dev, struct s921_isdb_t_tune_param | |||
16 | static int s921_isdb_get_status(struct s921_isdb_t *dev, void *data); | 17 | static int s921_isdb_get_status(struct s921_isdb_t *dev, void *data); |
17 | 18 | ||
18 | static u8 init_table[]={ 0x01, 0x40, 0x02, 0x00, 0x03, 0x40, 0x04, 0x01, | 19 | static u8 init_table[]={ 0x01, 0x40, 0x02, 0x00, 0x03, 0x40, 0x04, 0x01, |
19 | 0x05, 0x00, 0x06, 0x00, 0x07, 0x00, 0x08, 0x00, | 20 | 0x05, 0x00, 0x06, 0x00, 0x07, 0x00, 0x08, 0x00, |
20 | 0x09, 0x00, 0x0a, 0x00, 0x0b, 0x5a, 0x0c, 0x00, | 21 | 0x09, 0x00, 0x0a, 0x00, 0x0b, 0x5a, 0x0c, 0x00, |
21 | 0x0d, 0x00, 0x0f, 0x00, 0x13, 0x1b, 0x14, 0x80, | 22 | 0x0d, 0x00, 0x0f, 0x00, 0x13, 0x1b, 0x14, 0x80, |
22 | 0x15, 0x40, 0x17, 0x70, 0x18, 0x01, 0x19, 0x12, | 23 | 0x15, 0x40, 0x17, 0x70, 0x18, 0x01, 0x19, 0x12, |
23 | 0x1a, 0x01, 0x1b, 0x12, 0x1c, 0xa0, 0x1d, 0x00, | 24 | 0x1a, 0x01, 0x1b, 0x12, 0x1c, 0xa0, 0x1d, 0x00, |
24 | 0x1e, 0x0a, 0x1f, 0x08, 0x20, 0x40, 0x21, 0xff, | 25 | 0x1e, 0x0a, 0x1f, 0x08, 0x20, 0x40, 0x21, 0xff, |
25 | 0x22, 0x4c, 0x23, 0x4e, 0x24, 0x4c, 0x25, 0x00, | 26 | 0x22, 0x4c, 0x23, 0x4e, 0x24, 0x4c, 0x25, 0x00, |
26 | 0x26, 0x00, 0x27, 0xf4, 0x28, 0x60, 0x29, 0x88, | 27 | 0x26, 0x00, 0x27, 0xf4, 0x28, 0x60, 0x29, 0x88, |
27 | 0x2a, 0x40, 0x2b, 0x40, 0x2c, 0xff, 0x2d, 0x00, | 28 | 0x2a, 0x40, 0x2b, 0x40, 0x2c, 0xff, 0x2d, 0x00, |
28 | 0x2e, 0xff, 0x2f, 0x00, 0x30, 0x20, 0x31, 0x06, | 29 | 0x2e, 0xff, 0x2f, 0x00, 0x30, 0x20, 0x31, 0x06, |
29 | 0x32, 0x0c, 0x34, 0x0f, 0x37, 0xfe, 0x38, 0x00, | 30 | 0x32, 0x0c, 0x34, 0x0f, 0x37, 0xfe, 0x38, 0x00, |
30 | 0x39, 0x63, 0x3a, 0x10, 0x3b, 0x10, 0x47, 0x00, | 31 | 0x39, 0x63, 0x3a, 0x10, 0x3b, 0x10, 0x47, 0x00, |
31 | 0x49, 0xe5, 0x4b, 0x00, 0x50, 0xc0, 0x52, 0x20, | 32 | 0x49, 0xe5, 0x4b, 0x00, 0x50, 0xc0, 0x52, 0x20, |
32 | 0x54, 0x5a, 0x55, 0x5b, 0x56, 0x40, 0x57, 0x70, | 33 | 0x54, 0x5a, 0x55, 0x5b, 0x56, 0x40, 0x57, 0x70, |
33 | 0x5c, 0x50, 0x5d, 0x00, 0x62, 0x17, 0x63, 0x2f, | 34 | 0x5c, 0x50, 0x5d, 0x00, 0x62, 0x17, 0x63, 0x2f, |
34 | 0x64, 0x6f, 0x68, 0x00, 0x69, 0x89, 0x6a, 0x00, | 35 | 0x64, 0x6f, 0x68, 0x00, 0x69, 0x89, 0x6a, 0x00, |
35 | 0x6b, 0x00, 0x6c, 0x00, 0x6d, 0x00, 0x6e, 0x00, | 36 | 0x6b, 0x00, 0x6c, 0x00, 0x6d, 0x00, 0x6e, 0x00, |
36 | 0x70, 0x00, 0x71, 0x00, 0x75, 0x00, 0x76, 0x30, | 37 | 0x70, 0x00, 0x71, 0x00, 0x75, 0x00, 0x76, 0x30, |
37 | 0x77, 0x01, 0xaf, 0x00, 0xb0, 0xa0, 0xb2, 0x3d, | 38 | 0x77, 0x01, 0xaf, 0x00, 0xb0, 0xa0, 0xb2, 0x3d, |
38 | 0xb3, 0x25, 0xb4, 0x8b, 0xb5, 0x4b, 0xb6, 0x3f, | 39 | 0xb3, 0x25, 0xb4, 0x8b, 0xb5, 0x4b, 0xb6, 0x3f, |
39 | 0xb7, 0xff, 0xb8, 0xff, 0xb9, 0xfc, 0xba, 0x00, | 40 | 0xb7, 0xff, 0xb8, 0xff, 0xb9, 0xfc, 0xba, 0x00, |
40 | 0xbb, 0x00, 0xbc, 0x00, 0xd0, 0x30, 0xe4, 0x84, | 41 | 0xbb, 0x00, 0xbc, 0x00, 0xd0, 0x30, 0xe4, 0x84, |
41 | 0xf0, 0x48, 0xf1, 0x19, 0xf2, 0x5a, 0xf3, 0x8e, | 42 | 0xf0, 0x48, 0xf1, 0x19, 0xf2, 0x5a, 0xf3, 0x8e, |
42 | 0xf4, 0x2d, 0xf5, 0x07, 0xf6, 0x5a, 0xf7, 0xba, | 43 | 0xf4, 0x2d, 0xf5, 0x07, 0xf6, 0x5a, 0xf7, 0xba, |
43 | 0xf8, 0xd7 }; | 44 | 0xf8, 0xd7 }; |
44 | 45 | ||
45 | static u8 c_table[]={ 0x58, 0x8a, 0x7b, 0x59, 0x8c, 0x7b, 0x5a, 0x8e, 0x5b, | 46 | static u8 c_table[]={ 0x58, 0x8a, 0x7b, 0x59, 0x8c, 0x7b, 0x5a, 0x8e, 0x5b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, 0xc6, 0xdb, 0x77, 0xc8, 0xbb, 0x78, 0xca, 0xbb, | 56 | 0x76, 0xc6, 0xdb, 0x77, 0xc8, 0xbb, 0x78, 0xca, 0xbb, |
56 | 0x79, 0xcc, 0xbb, 0x7a, 0xce, 0xbb, 0x7b, 0xd0, 0xbb, | 57 | 0x79, 0xcc, 0xbb, 0x7a, 0xce, 0xbb, 0x7b, 0xd0, 0xbb, |
57 | 0x7c, 0xd2, 0xbb, 0x7d, 0xd4, 0xbb, 0x7e, 0xd6, 0xbb, | 58 | 0x7c, 0xd2, 0xbb, 0x7d, 0xd4, 0xbb, 0x7e, 0xd6, 0xbb, |
58 | 0x7f, 0xd8, 0xbb, 0x80, 0xda, 0x9b, 0x81, 0xdc, 0x9b, | 59 | 0x7f, 0xd8, 0xbb, 0x80, 0xda, 0x9b, 0x81, 0xdc, 0x9b, |
59 | 0x82, 0xde, 0x9b, 0x83, 0xe0, 0x9b, 0x84, 0xe2, 0x9b, | 60 | 0x82, 0xde, 0x9b, 0x83, 0xe0, 0x9b, 0x84, 0xe2, 0x9b, |
60 | 0x85, 0xe4, 0x9b, 0x86, 0xe6, 0x9b, 0x87, 0xe8, 0x9b, | 61 | 0x85, 0xe4, 0x9b, 0x86, 0xe6, 0x9b, 0x87, 0xe8, 0x9b, |
61 | 0x88, 0xea, 0x9b, 0x89, 0xec, 0x9b }; | 62 | 0x88, 0xea, 0x9b, 0x89, 0xec, 0x9b }; |
62 | 63 | ||
63 | int s921_isdb_cmd(struct s921_isdb_t *dev, u32 cmd, void *data) { | 64 | int s921_isdb_cmd(struct s921_isdb_t *dev, u32 cmd, void *data) { |
64 | switch(cmd) { | 65 | switch(cmd) { |
@@ -84,7 +85,7 @@ int s921_isdb_cmd(struct s921_isdb_t *dev, u32 cmd, void *data) { | |||
84 | static int s921_isdb_init(struct s921_isdb_t *dev) { | 85 | static int s921_isdb_init(struct s921_isdb_t *dev) { |
85 | unsigned int i; | 86 | unsigned int i; |
86 | unsigned int ret; | 87 | unsigned int ret; |
87 | printk("isdb_init\n"); | 88 | printk("isdb_init\n"); |
88 | for (i = 0; i < sizeof(init_table); i+=2) { | 89 | for (i = 0; i < sizeof(init_table); i+=2) { |
89 | ret = dev->i2c_write(dev->priv_dev, init_table[i], init_table[i+1]); | 90 | ret = dev->i2c_write(dev->priv_dev, init_table[i], init_table[i+1]); |
90 | if (ret != 0) { | 91 | if (ret != 0) { |
diff --git a/drivers/media/video/empia/sharp/s921_core.h b/drivers/media/dvb/frontends/s921_core.h index de2f10a44e72..de2f10a44e72 100644 --- a/drivers/media/video/empia/sharp/s921_core.h +++ b/drivers/media/dvb/frontends/s921_core.h | |||
diff --git a/drivers/media/video/empia/sharp/s921_module.c b/drivers/media/dvb/frontends/s921_module.c index 0f03d24ccb8a..3cbb9cb2cf47 100644 --- a/drivers/media/video/empia/sharp/s921_module.c +++ b/drivers/media/dvb/frontends/s921_module.c | |||
@@ -23,10 +23,10 @@ MODULE_PARM_DESC(debug,"s921 debugging (default off)"); | |||
23 | 23 | ||
24 | struct s921_state | 24 | struct s921_state |
25 | { | 25 | { |
26 | struct dvb_frontend frontend; | 26 | struct dvb_frontend frontend; |
27 | fe_modulation_t current_modulation; | 27 | fe_modulation_t current_modulation; |
28 | __u32 snr; | 28 | __u32 snr; |
29 | __u32 current_frequency; | 29 | __u32 current_frequency; |
30 | __u8 addr; | 30 | __u8 addr; |
31 | struct s921_isdb_t dev; | 31 | struct s921_isdb_t dev; |
32 | struct i2c_adapter *i2c; | 32 | struct i2c_adapter *i2c; |
@@ -46,7 +46,7 @@ static int s921_set_parameters(struct dvb_frontend *fe, struct dvb_frontend_para | |||
46 | 46 | ||
47 | static int s921_init(struct dvb_frontend *fe) { | 47 | static int s921_init(struct dvb_frontend *fe) { |
48 | printk("s921 init\n"); | 48 | printk("s921 init\n"); |
49 | return 0; | 49 | return 0; |
50 | } | 50 | } |
51 | 51 | ||
52 | static int s921_sleep(struct dvb_frontend *fe) { | 52 | static int s921_sleep(struct dvb_frontend *fe) { |
@@ -127,7 +127,7 @@ static struct dvb_frontend_ops demod_s921={ | |||
127 | static int s921_write(void *dev, u8 reg, u8 val) { | 127 | static int s921_write(void *dev, u8 reg, u8 val) { |
128 | struct s921_state *state = dev; | 128 | struct s921_state *state = dev; |
129 | char buf[2]={reg,val}; | 129 | char buf[2]={reg,val}; |
130 | int err; | 130 | int err; |
131 | struct i2c_msg i2cmsgs = { | 131 | struct i2c_msg i2cmsgs = { |
132 | .addr = state->addr, | 132 | .addr = state->addr, |
133 | .flags = 0, | 133 | .flags = 0, |
@@ -137,11 +137,11 @@ static int s921_write(void *dev, u8 reg, u8 val) { | |||
137 | 137 | ||
138 | if((err = i2c_transfer(state->i2c, &i2cmsgs, 1))<0) { | 138 | if((err = i2c_transfer(state->i2c, &i2cmsgs, 1))<0) { |
139 | printk("%s i2c_transfer error %d\n", __FUNCTION__, err); | 139 | printk("%s i2c_transfer error %d\n", __FUNCTION__, err); |
140 | if (err < 0) | 140 | if (err < 0) |
141 | return err; | 141 | return err; |
142 | else | 142 | else |
143 | return -EREMOTEIO; | 143 | return -EREMOTEIO; |
144 | } | 144 | } |
145 | 145 | ||
146 | return 0; | 146 | return 0; |
147 | } | 147 | } |
diff --git a/drivers/media/video/empia/sharp/s921_module.h b/drivers/media/dvb/frontends/s921_module.h index 78660424ba95..78660424ba95 100644 --- a/drivers/media/video/empia/sharp/s921_module.h +++ b/drivers/media/dvb/frontends/s921_module.h | |||
diff --git a/drivers/media/video/empia/sharp/Makefile b/drivers/media/video/empia/sharp/Makefile deleted file mode 100644 index 510561130064..000000000000 --- a/drivers/media/video/empia/sharp/Makefile +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | s921-objs := s921_module.o s921_core.o | ||
2 | |||
3 | obj-m += s921.o | ||