Re: [PATCH 2/17]DVB:Siano drivers - Update module name string to contain module version
Em 20-09-2011 07:30, Doron Cohen escreveu: Hi, This patch step adds version to module name string for all modules. Thanks, Doron Cohen --- From 81a55103537fb6df2b487819aa9a5af28a5c4bd2 Mon Sep 17 00:00:00 2001 From: Doron Cohen dor...@siano-ms.com Date: Wed, 14 Sep 2011 13:33:20 +0300 Subject: [PATCH 03/21] Add smsspi driver to support Siano SPI connected device using SPI generic driver modified: drivers/media/dvb/siano/Makefile modified: drivers/media/dvb/siano/smscoreapi.c new file: drivers/media/dvb/siano/smsdbg_prn.h modified: drivers/media/dvb/siano/smsspidrv.c modified: drivers/media/dvb/siano/smsspiphy.c --- drivers/media/dvb/siano/Makefile |2 + drivers/media/dvb/siano/smscoreapi.c |2 +- drivers/media/dvb/siano/smsdbg_prn.h | 56 ++ Patch is also mangled by your emailer. drivers/media/dvb/siano/smsspidrv.c | 33 +++- drivers/media/dvb/siano/smsspiphy.c | 40 5 files changed, 97 insertions(+), 36 deletions(-) create mode 100644 drivers/media/dvb/siano/smsdbg_prn.h diff --git a/drivers/media/dvb/siano/Makefile b/drivers/media/dvb/siano/Makefile index c54140b..affaf01 100644 --- a/drivers/media/dvb/siano/Makefile +++ b/drivers/media/dvb/siano/Makefile @@ -1,9 +1,11 @@ smsmdtv-objs := smscoreapi.o sms-cards.o smsendian.o smsir.o +smsspi-objs := smsspicommon.o smsspidrv.o smsspiphy.o obj-$(CONFIG_SMS_SIANO_MDTV) += smsmdtv.o smsdvb.o obj-$(CONFIG_SMS_USB_DRV) += smsusb.o obj-$(CONFIG_SMS_SDIO_DRV) += smssdio.o +obj-$(CONFIG_SMS_SPI_DRV) += smsspi.o EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core diff --git a/drivers/media/dvb/siano/smscoreapi.c b/drivers/media/dvb/siano/smscoreapi.c index 78765ed..239f453 100644 --- a/drivers/media/dvb/siano/smscoreapi.c +++ b/drivers/media/dvb/siano/smscoreapi.c @@ -39,7 +39,7 @@ #include smsir.h #include smsendian.h -static int sms_dbg; +int sms_dbg; module_param_named(debug, sms_dbg, int, 0644); MODULE_PARM_DESC(debug, set debug level (info=1, adv=2 (or-able))); diff --git a/drivers/media/dvb/siano/smsdbg_prn.h b/drivers/media/dvb/siano/smsdbg_prn.h new file mode 100644 index 000..ea157da --- /dev/null +++ b/drivers/media/dvb/siano/smsdbg_prn.h @@ -0,0 +1,56 @@ +/ + +Siano Mobile Silicon, Inc. +MDTV receiver kernel modules. +Copyright (C) 2006-2008, Uri Shkolnik + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + + This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see http://www.gnu.org/licenses/. + +/ + +#ifndef _SMS_DBG_H_ +#define _SMS_DBG_H_ + +#include linux/kernel.h +#include linux/module.h + +// +/* Debug Zones definitions. */ +// +#undef PERROR +# define PERROR(fmt, args...) \ + printk(KERN_ERR spibus error: line %d- %s(): fmt, __LINE__,\ + __func__, ## args) +#undef PWARNING +# define PWARNING(fmt, args...) \ + printk(KERN_WARNING spibus warning: line %d- %s(): fmt, __LINE__, \ + __func__, ## args) + +/* the debug macro - conditional compilation from the makefile */ +#undef PDEBUG/* undef it, just in case */ +#ifdef SPIBUS_DEBUG +# define PDEBUG(fmt, args...) \ + printk(KERN_DEBUG spibus: line %d- %s(): fmt, __LINE__, \ + __func__, ## args) +#else +# define PDEBUG(fmt, args...) /* not debugging: nothing */ +#endif + +/* The following defines are used for printing and +are mandatory for compilation. */ +#define TXT(str) str +#define PRN_DBG(str) PDEBUG str +#define PRN_ERR(str) PERROR str + +#endif /*_SMS_DBG_H_*/ diff --git a/drivers/media/dvb/siano/smsspidrv.c b/drivers/media/dvb/siano/smsspidrv.c index 35cce42..fa80c1a 100644 --- a/drivers/media/dvb/siano/smsspidrv.c +++ b/drivers/media/dvb/siano/smsspidrv.c @@ -79,18 +79,27 @@ struct _Msg { struct _spi_device_st *spi_dev; +int sms_dbg; static void spi_worker_thread(void *arg); static DECLARE_WORK(spi_work_queue, (void *)spi_worker_thread); static u8 smsspi_preamble[] = { 0xa5, 0x5a, 0xe7, 0x7e }; static u8 smsspi_startup[] = { 0, 0, 0xde, 0xc1, 0xa5, 0x51, 0xf1, 0xed };
[PATCH 2/17]DVB:Siano drivers - Update module name string to contain module version
Hi, This patch step adds version to module name string for all modules. Thanks, Doron Cohen --- From 81a55103537fb6df2b487819aa9a5af28a5c4bd2 Mon Sep 17 00:00:00 2001 From: Doron Cohen dor...@siano-ms.com Date: Wed, 14 Sep 2011 13:33:20 +0300 Subject: [PATCH 03/21] Add smsspi driver to support Siano SPI connected device using SPI generic driver modified: drivers/media/dvb/siano/Makefile modified: drivers/media/dvb/siano/smscoreapi.c new file: drivers/media/dvb/siano/smsdbg_prn.h modified: drivers/media/dvb/siano/smsspidrv.c modified: drivers/media/dvb/siano/smsspiphy.c --- drivers/media/dvb/siano/Makefile |2 + drivers/media/dvb/siano/smscoreapi.c |2 +- drivers/media/dvb/siano/smsdbg_prn.h | 56 ++ drivers/media/dvb/siano/smsspidrv.c | 33 +++- drivers/media/dvb/siano/smsspiphy.c | 40 5 files changed, 97 insertions(+), 36 deletions(-) create mode 100644 drivers/media/dvb/siano/smsdbg_prn.h diff --git a/drivers/media/dvb/siano/Makefile b/drivers/media/dvb/siano/Makefile index c54140b..affaf01 100644 --- a/drivers/media/dvb/siano/Makefile +++ b/drivers/media/dvb/siano/Makefile @@ -1,9 +1,11 @@ smsmdtv-objs := smscoreapi.o sms-cards.o smsendian.o smsir.o +smsspi-objs := smsspicommon.o smsspidrv.o smsspiphy.o obj-$(CONFIG_SMS_SIANO_MDTV) += smsmdtv.o smsdvb.o obj-$(CONFIG_SMS_USB_DRV) += smsusb.o obj-$(CONFIG_SMS_SDIO_DRV) += smssdio.o +obj-$(CONFIG_SMS_SPI_DRV) += smsspi.o EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core diff --git a/drivers/media/dvb/siano/smscoreapi.c b/drivers/media/dvb/siano/smscoreapi.c index 78765ed..239f453 100644 --- a/drivers/media/dvb/siano/smscoreapi.c +++ b/drivers/media/dvb/siano/smscoreapi.c @@ -39,7 +39,7 @@ #include smsir.h #include smsendian.h -static int sms_dbg; +int sms_dbg; module_param_named(debug, sms_dbg, int, 0644); MODULE_PARM_DESC(debug, set debug level (info=1, adv=2 (or-able))); diff --git a/drivers/media/dvb/siano/smsdbg_prn.h b/drivers/media/dvb/siano/smsdbg_prn.h new file mode 100644 index 000..ea157da --- /dev/null +++ b/drivers/media/dvb/siano/smsdbg_prn.h @@ -0,0 +1,56 @@ +/ + +Siano Mobile Silicon, Inc. +MDTV receiver kernel modules. +Copyright (C) 2006-2008, Uri Shkolnik + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + + This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see http://www.gnu.org/licenses/. + +/ + +#ifndef _SMS_DBG_H_ +#define _SMS_DBG_H_ + +#include linux/kernel.h +#include linux/module.h + +// +/* Debug Zones definitions. */ +// +#undef PERROR +# define PERROR(fmt, args...) \ + printk(KERN_ERR spibus error: line %d- %s(): fmt, __LINE__,\ + __func__, ## args) +#undef PWARNING +# define PWARNING(fmt, args...) \ + printk(KERN_WARNING spibus warning: line %d- %s(): fmt, __LINE__, \ + __func__, ## args) + +/* the debug macro - conditional compilation from the makefile */ +#undef PDEBUG /* undef it, just in case */ +#ifdef SPIBUS_DEBUG +# define PDEBUG(fmt, args...) \ + printk(KERN_DEBUG spibus: line %d- %s(): fmt, __LINE__, \ +__func__, ## args) +#else +# define PDEBUG(fmt, args...) /* not debugging: nothing */ +#endif + +/* The following defines are used for printing and +are mandatory for compilation. */ +#define TXT(str) str +#define PRN_DBG(str) PDEBUG str +#define PRN_ERR(str) PERROR str + +#endif /*_SMS_DBG_H_*/ diff --git a/drivers/media/dvb/siano/smsspidrv.c b/drivers/media/dvb/siano/smsspidrv.c index 35cce42..fa80c1a 100644 --- a/drivers/media/dvb/siano/smsspidrv.c +++ b/drivers/media/dvb/siano/smsspidrv.c @@ -79,18 +79,27 @@ struct _Msg { struct _spi_device_st *spi_dev; +int sms_dbg; static void spi_worker_thread(void *arg); static DECLARE_WORK(spi_work_queue, (void *)spi_worker_thread); static u8 smsspi_preamble[] = { 0xa5, 0x5a, 0xe7, 0x7e }; static u8 smsspi_startup[] = { 0, 0, 0xde, 0xc1, 0xa5, 0x51, 0xf1, 0xed }; +static u32 sms_intr_pin = SMS_INTR_PIN; +extern u32 host_intr_pin; + static u32 default_type = SMS_NOVA_B0; -static u32 intr_pin = SMS_INTR_PIN; -module_param(default_type, int, 0644);