diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-24 13:44:38 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-29 17:53:13 -0200 |
commit | c2e591fcb7aa5300cf6967edb29960628cf1831d (patch) | |
tree | fc334916c6b90395ad1583c2b8638116284a54f8 | |
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>
-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 96b93e21a84..8da1e81668e 100644 --- a/drivers/media/dvb/frontends/Kconfig +++ b/drivers/media/dvb/frontends/Kconfig @@ -369,6 +369,17 @@ config DVB_S5H1411 An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want to support this frontend. +comment "ISDB-T (terrestrial) frontends" + depends on DVB_CORE + +config DVB_S921 + tristate "Sharp S921 tuner" + depends on DVB_CORE && I2C + default m if DVB_FE_CUSTOMISE + help + AN ISDB-T DQPSK, QPSK, 16QAM and 64QAM 1seg tuner module. + Say Y when you want to support this frontend. + comment "Digital terrestrial only tuners/PLL" depends on DVB_CORE diff --git a/drivers/media/dvb/frontends/Makefile b/drivers/media/dvb/frontends/Makefile index aba79f4a63a..11a5407ecdb 100644 --- a/drivers/media/dvb/frontends/Makefile +++ b/drivers/media/dvb/frontends/Makefile @@ -5,6 +5,8 @@ EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ EXTRA_CFLAGS += -Idrivers/media/common/tuners/ +s921-objs := s921_module.o s921_core.o + obj-$(CONFIG_DVB_PLL) += dvb-pll.o obj-$(CONFIG_DVB_STV0299) += stv0299.o obj-$(CONFIG_DVB_SP8870) += sp8870.o @@ -55,3 +57,4 @@ obj-$(CONFIG_DVB_CX24116) += cx24116.o obj-$(CONFIG_DVB_SI21XX) += si21xx.o obj-$(CONFIG_DVB_STV0288) += stv0288.o obj-$(CONFIG_DVB_STB6000) += stb6000.o +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 01a7caebc0e..974b52be9ae 100644 --- a/drivers/media/video/empia/sharp/s921_core.c +++ b/drivers/media/dvb/frontends/s921_core.c @@ -8,6 +8,7 @@ #include <linux/kernel.h> #include <linux/module.h> +#include <linux/delay.h> #include "s921_core.h" 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 static int s921_isdb_get_status(struct s921_isdb_t *dev, void *data); static u8 init_table[]={ 0x01, 0x40, 0x02, 0x00, 0x03, 0x40, 0x04, 0x01, - 0x05, 0x00, 0x06, 0x00, 0x07, 0x00, 0x08, 0x00, - 0x09, 0x00, 0x0a, 0x00, 0x0b, 0x5a, 0x0c, 0x00, - 0x0d, 0x00, 0x0f, 0x00, 0x13, 0x1b, 0x14, 0x80, - 0x15, 0x40, 0x17, 0x70, 0x18, 0x01, 0x19, 0x12, - 0x1a, 0x01, 0x1b, 0x12, 0x1c, 0xa0, 0x1d, 0x00, - 0x1e, 0x0a, 0x1f, 0x08, 0x20, 0x40, 0x21, 0xff, - 0x22, 0x4c, 0x23, 0x4e, 0x24, 0x4c, 0x25, 0x00, - 0x26, 0x00, 0x27, 0xf4, 0x28, 0x60, 0x29, 0x88, - 0x2a, 0x40, 0x2b, 0x40, 0x2c, 0xff, 0x2d, 0x00, - 0x2e, 0xff, 0x2f, 0x00, 0x30, 0x20, 0x31, 0x06, - 0x32, 0x0c, 0x34, 0x0f, 0x37, 0xfe, 0x38, 0x00, - 0x39, 0x63, 0x3a, 0x10, 0x3b, 0x10, 0x47, 0x00, - 0x49, 0xe5, 0x4b, 0x00, 0x50, 0xc0, 0x52, 0x20, - 0x54, 0x5a, 0x55, 0x5b, 0x56, 0x40, 0x57, 0x70, - 0x5c, 0x50, 0x5d, 0x00, 0x62, 0x17, 0x63, 0x2f, - 0x64, 0x6f, 0x68, 0x00, 0x69, 0x89, 0x6a, 0x00, - 0x6b, 0x00, 0x6c, 0x00, 0x6d, 0x00, 0x6e, 0x00, - 0x70, 0x00, 0x71, 0x00, 0x75, 0x00, 0x76, 0x30, - 0x77, 0x01, 0xaf, 0x00, 0xb0, 0xa0, 0xb2, 0x3d, - 0xb3, 0x25, 0xb4, 0x8b, 0xb5, 0x4b, 0xb6, 0x3f, - 0xb7, 0xff, 0xb8, 0xff, 0xb9, 0xfc, 0xba, 0x00, - 0xbb, 0x00, 0xbc, 0x00, 0xd0, 0x30, 0xe4, 0x84, - 0xf0, 0x48, 0xf1, 0x19, 0xf2, 0x5a, 0xf3, 0x8e, - 0xf4, 0x2d, 0xf5, 0x07, 0xf6, 0x5a, 0xf7, 0xba, - 0xf8, 0xd7 }; + 0x05, 0x00, 0x06, 0x00, 0x07, 0x00, 0x08, 0x00, + 0x09, 0x00, 0x0a, 0x00, 0x0b, 0x5a, 0x0c, 0x00, + 0x0d, 0x00, 0x0f, 0x00, 0x13, 0x1b, 0x14, 0x80, + 0x15, 0x40, 0x17, 0x70, 0x18, 0x01, 0x19, 0x12, + 0x1a, 0x01, 0x1b, 0x12, 0x1c, 0xa0, 0x1d, 0x00, + 0x1e, 0x0a, 0x1f, 0x08, 0x20, 0x40, 0x21, 0xff, + 0x22, 0x4c, 0x23, 0x4e, 0x24, 0x4c, 0x25, 0x00, + 0x26, 0x00, 0x27, 0xf4, 0x28, 0x60, 0x29, 0x88, + 0x2a, 0x40, 0x2b, 0x40, 0x2c, 0xff, 0x2d, 0x00, + 0x2e, 0xff, 0x2f, 0x00, 0x30, 0x20, 0x31, 0x06, + 0x32, 0x0c, 0x34, 0x0f, 0x37, 0xfe, 0x38, 0x00, + 0x39, 0x63, 0x3a, 0x10, 0x3b, 0x10, 0x47, 0x00, + 0x49, 0xe5, 0x4b, 0x00, 0x50, 0xc0, 0x52, 0x20, + 0x54, 0x5a, 0x55, 0x5b, 0x56, 0x40, 0x57, 0x70, + 0x5c, 0x50, 0x5d, 0x00, 0x62, 0x17, 0x63, 0x2f, + 0x64, 0x6f, 0x68, 0x00, 0x69, 0x89, 0x6a, 0x00, + 0x6b, 0x00, 0x6c, 0x00, 0x6d, 0x00, 0x6e, 0x00, + 0x70, 0x00, 0x71, 0x00, 0x75, 0x00, 0x76, 0x30, + 0x77, 0x01, 0xaf, 0x00, 0xb0, 0xa0, 0xb2, 0x3d, + 0xb3, 0x25, 0xb4, 0x8b, 0xb5, 0x4b, 0xb6, 0x3f, + 0xb7, 0xff, 0xb8, 0xff, 0xb9, 0xfc, 0xba, 0x00, + 0xbb, 0x00, 0xbc, 0x00, 0xd0, 0x30, 0xe4, 0x84, + 0xf0, 0x48, 0xf1, 0x19, 0xf2, 0x5a, 0xf3, 0x8e, + 0xf4, 0x2d, 0xf5, 0x07, 0xf6, 0x5a, 0xf7, 0xba, + 0xf8, 0xd7 }; static u8 c_table[]={ 0x58, 0x8a, 0x7b, 0x59, 0x8c, 0x7b, 0x5a, 0x8e, 0x5b, - 0x5b, 0x90, 0x5b, 0x5c, 0x92, 0x5b, 0x5d, 0x94, 0x5b, - 0x5e, 0x96, 0x5b, 0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 0x6b, 0xb0, 0x1b, 0x6c, 0xb2, 0x1b, + 0x6d, 0xb4, 0xfb, 0x6e, 0xb6, 0xfb, 0x6f, 0xb8, 0xfb, + 0x70, 0xba, 0xfb, 0x71, 0xbc, 0xdb, 0x72, 0xbe, 0xdb, + 0x73, 0xc0, 0xdb, 0x74, 0xc2, 0xdb, 0x75, 0xc4, 0xdb, + 0x76, 0xc6, 0xdb, 0x77, 0xc8, 0xbb, 0x78, 0xca, 0xbb, + 0x79, 0xcc, 0xbb, 0x7a, 0xce, 0xbb, 0x7b, 0xd0, 0xbb, + 0x7c, 0xd2, 0xbb, 0x7d, 0xd4, 0xbb, 0x7e, 0xd6, 0xbb, + 0x7f, 0xd8, 0xbb, 0x80, 0xda, 0x9b, 0x81, 0xdc, 0x9b, + 0x82, 0xde, 0x9b, 0x83, 0xe0, 0x9b, 0x84, 0xe2, 0x9b, + 0x85, 0xe4, 0x9b, 0x86, 0xe6, 0x9b, 0x87, 0xe8, 0x9b, + 0x88, 0xea, 0x9b, 0x89, 0xec, 0x9b }; int s921_isdb_cmd(struct s921_isdb_t *dev, u32 cmd, void *data) { switch(cmd) { @@ -84,7 +85,7 @@ int s921_isdb_cmd(struct s921_isdb_t *dev, u32 cmd, void *data) { static int s921_isdb_init(struct s921_isdb_t *dev) { unsigned int i; unsigned int ret; - printk("isdb_init\n"); + printk("isdb_init\n"); for (i = 0; i < sizeof(init_table); i+=2) { ret = dev->i2c_write(dev->priv_dev, init_table[i], init_table[i+1]); if (ret != 0) { diff --git a/drivers/media/video/empia/sharp/s921_core.h b/drivers/media/dvb/frontends/s921_core.h index de2f10a44e7..de2f10a44e7 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 0f03d24ccb8..3cbb9cb2cf4 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)"); struct s921_state { - struct dvb_frontend frontend; - fe_modulation_t current_modulation; - __u32 snr; - __u32 current_frequency; + struct dvb_frontend frontend; + fe_modulation_t current_modulation; + __u32 snr; + __u32 current_frequency; __u8 addr; struct s921_isdb_t dev; struct i2c_adapter *i2c; @@ -46,7 +46,7 @@ static int s921_set_parameters(struct dvb_frontend *fe, struct dvb_frontend_para static int s921_init(struct dvb_frontend *fe) { printk("s921 init\n"); - return 0; + return 0; } static int s921_sleep(struct dvb_frontend *fe) { @@ -127,7 +127,7 @@ static struct dvb_frontend_ops demod_s921={ static int s921_write(void *dev, u8 reg, u8 val) { struct s921_state *state = dev; char buf[2]={reg,val}; - int err; + int err; struct i2c_msg i2cmsgs = { .addr = state->addr, .flags = 0, @@ -137,11 +137,11 @@ static int s921_write(void *dev, u8 reg, u8 val) { if((err = i2c_transfer(state->i2c, &i2cmsgs, 1))<0) { printk("%s i2c_transfer error %d\n", __FUNCTION__, err); - if (err < 0) - return err; - else - return -EREMOTEIO; - } + if (err < 0) + return err; + else + return -EREMOTEIO; + } return 0; } diff --git a/drivers/media/video/empia/sharp/s921_module.h b/drivers/media/dvb/frontends/s921_module.h index 78660424ba9..78660424ba9 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 51056113006..00000000000 --- a/drivers/media/video/empia/sharp/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -s921-objs := s921_module.o s921_core.o - -obj-m += s921.o |