diff options
Diffstat (limited to 'drivers/media/dvb/siano')
-rw-r--r-- | drivers/media/dvb/siano/Makefile | 4 | ||||
-rw-r--r-- | drivers/media/dvb/siano/smscoreapi.c | 46 | ||||
-rw-r--r-- | drivers/media/dvb/siano/smscoreapi.h | 14 | ||||
-rw-r--r-- | drivers/media/dvb/siano/smsdvb.c | 17 | ||||
-rw-r--r-- | drivers/media/dvb/siano/smsusb.c | 10 |
5 files changed, 62 insertions, 29 deletions
diff --git a/drivers/media/dvb/siano/Makefile b/drivers/media/dvb/siano/Makefile index ee0737af98c..bcf93f4828b 100644 --- a/drivers/media/dvb/siano/Makefile +++ b/drivers/media/dvb/siano/Makefile | |||
@@ -1,6 +1,8 @@ | |||
1 | sms1xxx-objs := smscoreapi.o smsusb.o smsdvb.o sms-cards.o | 1 | sms1xxx-objs := smscoreapi.o sms-cards.o |
2 | 2 | ||
3 | obj-$(CONFIG_DVB_SIANO_SMS1XXX) += sms1xxx.o | 3 | obj-$(CONFIG_DVB_SIANO_SMS1XXX) += sms1xxx.o |
4 | obj-$(CONFIG_DVB_SIANO_SMS1XXX) += smsusb.o | ||
5 | obj-$(CONFIG_DVB_SIANO_SMS1XXX) += smsdvb.o | ||
4 | 6 | ||
5 | EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core | 7 | EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core |
6 | 8 | ||
diff --git a/drivers/media/dvb/siano/smscoreapi.c b/drivers/media/dvb/siano/smscoreapi.c index cf613f22fb8..6b33acd861d 100644 --- a/drivers/media/dvb/siano/smscoreapi.c +++ b/drivers/media/dvb/siano/smscoreapi.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * This file contains implementation for the interface to sms core component | 4 | * This file contains implementation for the interface to sms core component |
5 | * | 5 | * |
6 | * author: Anatoly Greenblat | 6 | * author: Uri Shkolnik |
7 | * | 7 | * |
8 | * Copyright (c), 2005-2008 Siano Mobile Silicon, Inc. | 8 | * Copyright (c), 2005-2008 Siano Mobile Silicon, Inc. |
9 | * | 9 | * |
@@ -732,7 +732,7 @@ static char *smscore_fw_lkup[][SMS_NUM_OF_DEVICE_TYPES] = { | |||
732 | /*DVBH*/ | 732 | /*DVBH*/ |
733 | {"none", "dvb_nova_12mhz.inp", "dvb_nova_12mhz_b0.inp", "none"}, | 733 | {"none", "dvb_nova_12mhz.inp", "dvb_nova_12mhz_b0.inp", "none"}, |
734 | /*TDMB*/ | 734 | /*TDMB*/ |
735 | {"none", "tdmb_nova_12mhz.inp", "none", "none"}, | 735 | {"none", "tdmb_nova_12mhz.inp", "tdmb_nova_12mhz_b0.inp", "none"}, |
736 | /*DABIP*/ | 736 | /*DABIP*/ |
737 | {"none", "none", "none", "none"}, | 737 | {"none", "none", "none", "none"}, |
738 | /*BDA*/ | 738 | /*BDA*/ |
@@ -1276,12 +1276,12 @@ static int __init smscore_module_init(void) | |||
1276 | INIT_LIST_HEAD(&g_smscore_registry); | 1276 | INIT_LIST_HEAD(&g_smscore_registry); |
1277 | kmutex_init(&g_smscore_registrylock); | 1277 | kmutex_init(&g_smscore_registrylock); |
1278 | 1278 | ||
1279 | /* USB Register */ | ||
1280 | rc = smsusb_register(); | ||
1281 | 1279 | ||
1282 | /* DVB Register */ | ||
1283 | rc = smsdvb_register(); | ||
1284 | 1280 | ||
1281 | |||
1282 | |||
1283 | |||
1284 | return rc; | ||
1285 | sms_debug("rc %d", rc); | 1285 | sms_debug("rc %d", rc); |
1286 | 1286 | ||
1287 | return rc; | 1287 | return rc; |
@@ -1290,6 +1290,10 @@ static int __init smscore_module_init(void) | |||
1290 | static void __exit smscore_module_exit(void) | 1290 | static void __exit smscore_module_exit(void) |
1291 | { | 1291 | { |
1292 | 1292 | ||
1293 | |||
1294 | |||
1295 | |||
1296 | |||
1293 | kmutex_lock(&g_smscore_deviceslock); | 1297 | kmutex_lock(&g_smscore_deviceslock); |
1294 | while (!list_empty(&g_smscore_notifyees)) { | 1298 | while (!list_empty(&g_smscore_notifyees)) { |
1295 | struct smscore_device_notifyee_t *notifyee = | 1299 | struct smscore_device_notifyee_t *notifyee = |
@@ -1312,18 +1316,34 @@ static void __exit smscore_module_exit(void) | |||
1312 | } | 1316 | } |
1313 | kmutex_unlock(&g_smscore_registrylock); | 1317 | kmutex_unlock(&g_smscore_registrylock); |
1314 | 1318 | ||
1315 | /* DVB UnRegister */ | 1319 | //#ifdef DVB_CORE |
1316 | smsdvb_unregister(); | 1320 | // smsdvb_unregister(); |
1317 | 1321 | //#endif | |
1318 | /* Unregister USB */ | ||
1319 | smsusb_unregister(); | ||
1320 | 1322 | ||
1321 | sms_debug(""); | 1323 | sms_debug(""); |
1322 | } | 1324 | } |
1323 | 1325 | ||
1326 | EXPORT_SYMBOL(smscore_onresponse); | ||
1327 | EXPORT_SYMBOL(sms_get_board); | ||
1328 | EXPORT_SYMBOL(sms_debug); | ||
1329 | EXPORT_SYMBOL(smscore_putbuffer); | ||
1330 | EXPORT_SYMBOL(smscore_registry_getmode); | ||
1331 | EXPORT_SYMBOL(smscore_register_device); | ||
1332 | EXPORT_SYMBOL(smscore_set_board_id); | ||
1333 | EXPORT_SYMBOL(smscore_start_device); | ||
1334 | EXPORT_SYMBOL(smscore_unregister_device); | ||
1335 | EXPORT_SYMBOL(smscore_getbuffer); | ||
1336 | EXPORT_SYMBOL(smscore_get_device_mode); | ||
1337 | EXPORT_SYMBOL(smscore_register_client); | ||
1338 | EXPORT_SYMBOL(smscore_unregister_hotplug); | ||
1339 | EXPORT_SYMBOL(smsclient_sendrequest); | ||
1340 | EXPORT_SYMBOL(smscore_unregister_client); | ||
1341 | EXPORT_SYMBOL(smscore_get_board_id); | ||
1342 | EXPORT_SYMBOL(smscore_register_hotplug); | ||
1343 | |||
1324 | module_init(smscore_module_init); | 1344 | module_init(smscore_module_init); |
1325 | module_exit(smscore_module_exit); | 1345 | module_exit(smscore_module_exit); |
1326 | 1346 | ||
1327 | MODULE_DESCRIPTION("Driver for the Siano SMS1XXX USB dongle"); | 1347 | MODULE_DESCRIPTION("Siano MDTV Core module"); |
1328 | MODULE_AUTHOR("Siano Mobile Silicon,,, (doronc@siano-ms.com)"); | 1348 | MODULE_AUTHOR("Siano Mobile Silicon, Inc. (uris@siano-ms.com)"); |
1329 | MODULE_LICENSE("GPL"); | 1349 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/media/dvb/siano/smscoreapi.h b/drivers/media/dvb/siano/smscoreapi.h index bd3cc2e26ab..cb2f4848588 100644 --- a/drivers/media/dvb/siano/smscoreapi.h +++ b/drivers/media/dvb/siano/smscoreapi.h | |||
@@ -29,13 +29,13 @@ | |||
29 | #include <linux/scatterlist.h> | 29 | #include <linux/scatterlist.h> |
30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
31 | #include <asm/page.h> | 31 | #include <asm/page.h> |
32 | #include <linux/mutex.h> | ||
32 | 33 | ||
33 | #include "dmxdev.h" | 34 | #include "dmxdev.h" |
34 | #include "dvbdev.h" | 35 | #include "dvbdev.h" |
35 | #include "dvb_demux.h" | 36 | #include "dvb_demux.h" |
36 | #include "dvb_frontend.h" | 37 | #include "dvb_frontend.h" |
37 | 38 | ||
38 | #include <linux/mutex.h> | ||
39 | 39 | ||
40 | #define kmutex_init(_p_) mutex_init(_p_) | 40 | #define kmutex_init(_p_) mutex_init(_p_) |
41 | #define kmutex_lock(_p_) mutex_lock(_p_) | 41 | #define kmutex_lock(_p_) mutex_lock(_p_) |
@@ -397,6 +397,11 @@ extern int smsclient_sendrequest(struct smscore_client_t *client, | |||
397 | extern void smscore_onresponse(struct smscore_device_t *coredev, | 397 | extern void smscore_onresponse(struct smscore_device_t *coredev, |
398 | struct smscore_buffer_t *cb); | 398 | struct smscore_buffer_t *cb); |
399 | 399 | ||
400 | extern int smscore_get_common_buffer_size(struct smscore_device_t *coredev); | ||
401 | extern int smscore_map_common_buffer(struct smscore_device_t *coredev, | ||
402 | struct vm_area_struct *vma); | ||
403 | extern int smscore_get_fw_filename(struct smscore_device_t *coredev, int mode, char* filename); | ||
404 | extern int smscore_send_fw_file(struct smscore_device_t *coredev, u8* ufwbuf,int size); | ||
400 | 405 | ||
401 | extern | 406 | extern |
402 | struct smscore_buffer_t *smscore_getbuffer(struct smscore_device_t *coredev); | 407 | struct smscore_buffer_t *smscore_getbuffer(struct smscore_device_t *coredev); |
@@ -412,13 +417,6 @@ int smscore_get_board_id(struct smscore_device_t *core); | |||
412 | 417 | ||
413 | int smscore_led_state(struct smscore_device_t *core, int led); | 418 | int smscore_led_state(struct smscore_device_t *core, int led); |
414 | 419 | ||
415 | /* smsdvb.c */ | ||
416 | int smsdvb_register(void); | ||
417 | void smsdvb_unregister(void); | ||
418 | |||
419 | /* smsusb.c */ | ||
420 | int smsusb_register(void); | ||
421 | void smsusb_unregister(void); | ||
422 | 420 | ||
423 | /* ------------------------------------------------------------------------ */ | 421 | /* ------------------------------------------------------------------------ */ |
424 | 422 | ||
diff --git a/drivers/media/dvb/siano/smsdvb.c b/drivers/media/dvb/siano/smsdvb.c index 28e90489001..36dc9f2d117 100644 --- a/drivers/media/dvb/siano/smsdvb.c +++ b/drivers/media/dvb/siano/smsdvb.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Driver for the Siano SMS1xxx USB dongle | 2 | * Driver for the Siano SMS1xxx USB dongle |
3 | * | 3 | * |
4 | * author: Anatoly Greenblat | 4 | * Author: Uri Shkolni |
5 | * | 5 | * |
6 | * Copyright (c), 2005-2008 Siano Mobile Silicon, Inc. | 6 | * Copyright (c), 2005-2008 Siano Mobile Silicon, Inc. |
7 | * | 7 | * |
@@ -368,7 +368,7 @@ static void smsdvb_release(struct dvb_frontend *fe) | |||
368 | 368 | ||
369 | static struct dvb_frontend_ops smsdvb_fe_ops = { | 369 | static struct dvb_frontend_ops smsdvb_fe_ops = { |
370 | .info = { | 370 | .info = { |
371 | .name = "Siano Mobile Digital SMS1xxx", | 371 | .name = "Siano Mobile Digital MDTV Receiver", |
372 | .type = FE_OFDM, | 372 | .type = FE_OFDM, |
373 | .frequency_min = 44250000, | 373 | .frequency_min = 44250000, |
374 | .frequency_max = 867250000, | 374 | .frequency_max = 867250000, |
@@ -410,7 +410,7 @@ static int smsdvb_hotplug(struct smscore_device_t *coredev, | |||
410 | if (!arrival) | 410 | if (!arrival) |
411 | return 0; | 411 | return 0; |
412 | 412 | ||
413 | if (smscore_get_device_mode(coredev) != 4) { | 413 | if (smscore_get_device_mode(coredev) != DEVICE_MODE_DVBT_BDA) { |
414 | sms_err("SMS Device mode is not set for " | 414 | sms_err("SMS Device mode is not set for " |
415 | "DVB operation."); | 415 | "DVB operation."); |
416 | return 0; | 416 | return 0; |
@@ -512,7 +512,7 @@ adapter_error: | |||
512 | return rc; | 512 | return rc; |
513 | } | 513 | } |
514 | 514 | ||
515 | int smsdvb_register(void) | 515 | int smsdvb_module_init(void) |
516 | { | 516 | { |
517 | int rc; | 517 | int rc; |
518 | 518 | ||
@@ -526,7 +526,7 @@ int smsdvb_register(void) | |||
526 | return rc; | 526 | return rc; |
527 | } | 527 | } |
528 | 528 | ||
529 | void smsdvb_unregister(void) | 529 | void smsdvb_module_exit(void) |
530 | { | 530 | { |
531 | smscore_unregister_hotplug(smsdvb_hotplug); | 531 | smscore_unregister_hotplug(smsdvb_hotplug); |
532 | 532 | ||
@@ -538,3 +538,10 @@ void smsdvb_unregister(void) | |||
538 | 538 | ||
539 | kmutex_unlock(&g_smsdvb_clientslock); | 539 | kmutex_unlock(&g_smsdvb_clientslock); |
540 | } | 540 | } |
541 | |||
542 | module_init(smsdvb_module_init); | ||
543 | module_exit(smsdvb_module_exit); | ||
544 | |||
545 | MODULE_DESCRIPTION("SMS DVB subsystem adaptation module"); | ||
546 | MODULE_AUTHOR("Siano Mobile Silicon, INC. (uris@siano-ms.com)"); | ||
547 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/media/dvb/siano/smsusb.c b/drivers/media/dvb/siano/smsusb.c index f8cfeaae5cc..66e413a78a9 100644 --- a/drivers/media/dvb/siano/smsusb.c +++ b/drivers/media/dvb/siano/smsusb.c | |||
@@ -531,7 +531,7 @@ static struct usb_driver smsusb_driver = { | |||
531 | .resume = smsusb_resume, | 531 | .resume = smsusb_resume, |
532 | }; | 532 | }; |
533 | 533 | ||
534 | int smsusb_register(void) | 534 | int smsusb_module_init(void) |
535 | { | 535 | { |
536 | int rc = usb_register(&smsusb_driver); | 536 | int rc = usb_register(&smsusb_driver); |
537 | if (rc) | 537 | if (rc) |
@@ -542,10 +542,16 @@ int smsusb_register(void) | |||
542 | return rc; | 542 | return rc; |
543 | } | 543 | } |
544 | 544 | ||
545 | void smsusb_unregister(void) | 545 | void smsusb_module_exit(void) |
546 | { | 546 | { |
547 | sms_debug(""); | 547 | sms_debug(""); |
548 | /* Regular USB Cleanup */ | 548 | /* Regular USB Cleanup */ |
549 | usb_deregister(&smsusb_driver); | 549 | usb_deregister(&smsusb_driver); |
550 | } | 550 | } |
551 | 551 | ||
552 | module_init(smsusb_module_init); | ||
553 | module_exit(smsusb_module_exit); | ||
554 | |||
555 | MODULE_DESCRIPTION("Driver for the Siano SMS1XXX USB dongle"); | ||
556 | MODULE_AUTHOR("Siano Mobile Silicon, INC. (uris@siano-ms.com)"); | ||
557 | MODULE_LICENSE("GPL"); | ||