Re: [PATCH 2/7] drivers:staging: Kconfig, Makefile for TI's ST ldisc

Previous thread: [PATCH 6/7] drivers:staging: sources for ST header file by pavan_savoy on Tuesday, March 23, 2010 - 1:41 pm. (3 messages)

Next thread: [PATCH 1/7] serial: TTY: new ldisc for TI BT/FM/GPS chips by pavan_savoy on Tuesday, March 23, 2010 - 1:41 pm. (6 messages)
From: pavan_savoy
Date: Tuesday, March 23, 2010 - 1:41 pm

From: Pavan Savoy <pavan_savoy@ti.com>

This change adds the Kconfig and Make file for TI's
ST line discipline driver and the BlueZ driver for BT
core of the TI BT/FM/GPS combo chip.

Signed-off-by: Pavan Savoy <pavan_savoy@ti.com>
---
 drivers/staging/Kconfig        |    2 ++
 drivers/staging/Makefile       |    1 +
 drivers/staging/ti-st/Kconfig  |   24 ++++++++++++++++++++++++
 drivers/staging/ti-st/Makefile |    7 +++++++
 4 files changed, 34 insertions(+), 0 deletions(-)
 create mode 100644 drivers/staging/ti-st/Kconfig
 create mode 100644 drivers/staging/ti-st/Makefile

diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
index 5589616..209fe00 100644
--- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig
@@ -141,5 +141,7 @@ source "drivers/staging/dt3155/Kconfig"
 
 source "drivers/staging/crystalhd/Kconfig"
 
+source "drivers/staging/ti-st/Kconfig"
+
 endif # !STAGING_EXCLUDE_BUILD
 endif # STAGING
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index ec45d4b..b41aa1a 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -52,3 +52,4 @@ obj-$(CONFIG_PCMCIA_NETWAVE)	+= netwave/
 obj-$(CONFIG_FB_SM7XX)		+= sm7xx/
 obj-$(CONFIG_DT3155)		+= dt3155/
 obj-$(CONFIG_CRYSTALHD)		+= crystalhd/
+obj-$(CONFIG_TI_ST)		+= ti-st/
diff --git a/drivers/staging/ti-st/Kconfig b/drivers/staging/ti-st/Kconfig
new file mode 100644
index 0000000..120e8db
--- /dev/null
+++ b/drivers/staging/ti-st/Kconfig
@@ -0,0 +1,24 @@
+#
+# TI's shared transport line discipline and the protocol
+# drivers (BT, FM and GPS)
+#
+menu "Texas Instruments shared transport line discipline"
+config TI_ST
+	tristate "shared transport core driver"
+	select FW_LOADER
+	help
+	  This enables the shared transport core driver for TI
+	  BT / FM and GPS combo chips. This enables protocol drivers
+	  to register themselves with core and send data, the responses
+	  are returned to relevant protocol drivers based on their
+	  packet types.
+
+config ...
From: pavan_savoy
Date: Tuesday, March 23, 2010 - 1:41 pm

From: Pavan Savoy <pavan_savoy@ti.com>

Texas Instruments BT, FM and GPS combo chips/drivers
make use of a single TTY to communicate with the chip.
This module constitutes the core logic, TTY ldisc driver
and the exported symbols for registering/unregistering of
the protocol drivers such as BT/FM/GPS.

Signed-off-by: Pavan Savoy <pavan_savoy@ti.com>
---
 drivers/staging/ti-st/st_core.c | 1057 +++++++++++++++++++++++++++++++++++++++
 drivers/staging/ti-st/st_core.h |   92 ++++
 2 files changed, 1149 insertions(+), 0 deletions(-)
 create mode 100644 drivers/staging/ti-st/st_core.c
 create mode 100644 drivers/staging/ti-st/st_core.h

diff --git a/drivers/staging/ti-st/st_core.c b/drivers/staging/ti-st/st_core.c
new file mode 100644
index 0000000..ef07ffa
--- /dev/null
+++ b/drivers/staging/ti-st/st_core.c
@@ -0,0 +1,1057 @@
+/*
+ *  Shared Transport Line discipline driver Core
+ *	This hooks up ST KIM driver and ST LL driver
+ *  Copyright (C) 2009 Texas Instruments
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ *  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, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/tty.h>
+
+/* understand BT, FM and GPS for now */
+#include <net/bluetooth/bluetooth.h>
+#include <net/bluetooth/hci_core.h>
+#include <net/bluetooth/hci.h>
+#include "fm.h"
+/*
+ * packet formats for fm and gps
+ * #include ...
From: pavan_savoy
Date: Tuesday, March 23, 2010 - 1:41 pm

From: Pavan Savoy <pavan_savoy@ti.com>

Texas Instruments BT, FM and GPS combo chips/drivers
make use of a single TTY to communicate with the chip.
This module constitutes the proprietary power management
protocol from TI for the BT/FM/GPS combo chips

Signed-off-by: Pavan Savoy <pavan_savoy@ti.com>
---
 drivers/staging/ti-st/st_ll.c |  169 +++++++++++++++++++++++++++++++++++++++++
 drivers/staging/ti-st/st_ll.h |   67 ++++++++++++++++
 2 files changed, 236 insertions(+), 0 deletions(-)
 create mode 100644 drivers/staging/ti-st/st_ll.c
 create mode 100644 drivers/staging/ti-st/st_ll.h

diff --git a/drivers/staging/ti-st/st_ll.c b/drivers/staging/ti-st/st_ll.c
new file mode 100644
index 0000000..5e42cbe
--- /dev/null
+++ b/drivers/staging/ti-st/st_ll.c
@@ -0,0 +1,169 @@
+/*
+ *  Shared Transport driver
+ *	HCI-LL module responsible for TI proprietary HCI_LL protocol
+ *  Copyright (C) 2009 Texas Instruments
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ *  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, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include "st_ll.h"
+
+/* all debug macros go in here */
+#define ST_LL_ERR(fmt, arg...)  printk(KERN_ERR "(stll):"fmt"\n" , ## arg)
+#if defined(DEBUG)		/* limited debug messages */
+#define ST_LL_DBG(fmt, arg...)  printk(KERN_INFO "(stll):"fmt"\n" , ## arg)
+#define ST_LL_VER(fmt, arg...)
+#elif defined(VERBOSE)		/* very verbose */
+#define ST_LL_DBG(fmt, arg...)  printk(KERN_INFO ...
From: pavan_savoy
Date: Tuesday, March 23, 2010 - 1:41 pm

From: Pavan Savoy <pavan_savoy@ti.com>

Kernel Space Init-Manager works along with User-Mode
Init Manager daemon running to maintain the UART state.
It also is a platform driver with a relevant platform device
in the board-*.c along with the list of BT/FM/GPS chip enable
gpio configuration

Signed-off-by: Pavan Savoy <pavan_savoy@ti.com>
---
 drivers/staging/ti-st/st_kim.c |  717 ++++++++++++++++++++++++++++++++++++++++
 drivers/staging/ti-st/st_kim.h |  151 +++++++++
 2 files changed, 868 insertions(+), 0 deletions(-)
 create mode 100644 drivers/staging/ti-st/st_kim.c
 create mode 100644 drivers/staging/ti-st/st_kim.h

diff --git a/drivers/staging/ti-st/st_kim.c b/drivers/staging/ti-st/st_kim.c
new file mode 100644
index 0000000..20d6927
--- /dev/null
+++ b/drivers/staging/ti-st/st_kim.c
@@ -0,0 +1,717 @@
+/*
+ *  Shared Transport Line discipline driver Core
+ *	Init Manager module responsible for GPIO control
+ *	and firmware download
+ *  Copyright (C) 2009 Texas Instruments
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ *  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, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include <linux/platform_device.h>
+#include <linux/jiffies.h>
+#include <linux/firmware.h>
+#include <linux/delay.h>
+#include <linux/wait.h>
+#include <linux/gpio.h>
+
+#include <linux/sched.h>
+
+#include "st_kim.h"
+/* understand BT events for fw response */
+#include <net/bluetooth/bluetooth.h>
+#include ...
From: Greg KH
Date: Tuesday, March 23, 2010 - 7:28 pm

Again, you just broke the build.

Please fix the ordering of your patches.

thanks,

greg k-h
--

From: Greg KH
Date: Tuesday, March 23, 2010 - 7:30 pm

To add a new staging driver, I need a TODO file that lists what needs to
be done to the code in order to get it merged into the main portion of
the kernel, and who is responsible for it.  Look at the other
drivers/staging/*/TODO files for examples of what to do.

thanks,

greg k-h
--

Previous thread: [PATCH 6/7] drivers:staging: sources for ST header file by pavan_savoy on Tuesday, March 23, 2010 - 1:41 pm. (3 messages)

Next thread: [PATCH 1/7] serial: TTY: new ldisc for TI BT/FM/GPS chips by pavan_savoy on Tuesday, March 23, 2010 - 1:41 pm. (6 messages)