aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavan Savoy <pavan_savoy@ti.com>2011-02-24 09:06:53 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-02-28 20:53:53 -0500
commitb75ae07963f99f89319b17935af20513d57df577 (patch)
treed6213496339147764425f9cf0b0e1e57468abca1
parent14f983264a74a5734541e094d97a0e681b2f3bb2 (diff)
staging: delete ti-st from staging
The 2 drivers originally staged, the core ti-st driver and the btwilink bluetooth driver have now moved to relevant directories, so deleting the ti-st/ from staging. Signed-off-by: Pavan Savoy <pavan_savoy@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/Kconfig2
-rw-r--r--drivers/staging/Makefile1
-rw-r--r--drivers/staging/ti-st/Kconfig14
-rw-r--r--drivers/staging/ti-st/Makefile5
-rw-r--r--drivers/staging/ti-st/TODO8
-rw-r--r--drivers/staging/ti-st/btwilink.c363
-rw-r--r--drivers/staging/ti-st/sysfs-uim28
7 files changed, 0 insertions, 421 deletions
diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
index 4b137a6d993..5295d8518d1 100644
--- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig
@@ -143,8 +143,6 @@ source "drivers/staging/crystalhd/Kconfig"
143 143
144source "drivers/staging/cxt1e1/Kconfig" 144source "drivers/staging/cxt1e1/Kconfig"
145 145
146source "drivers/staging/ti-st/Kconfig"
147
148source "drivers/staging/xgifb/Kconfig" 146source "drivers/staging/xgifb/Kconfig"
149 147
150source "drivers/staging/msm/Kconfig" 148source "drivers/staging/msm/Kconfig"
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index dcd47dba0e9..0983edca5bd 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -54,7 +54,6 @@ obj-$(CONFIG_FB_SM7XX) += sm7xx/
54obj-$(CONFIG_VIDEO_DT3155) += dt3155v4l/ 54obj-$(CONFIG_VIDEO_DT3155) += dt3155v4l/
55obj-$(CONFIG_CRYSTALHD) += crystalhd/ 55obj-$(CONFIG_CRYSTALHD) += crystalhd/
56obj-$(CONFIG_CXT1E1) += cxt1e1/ 56obj-$(CONFIG_CXT1E1) += cxt1e1/
57obj-$(CONFIG_TI_ST) += ti-st/
58obj-$(CONFIG_FB_XGI) += xgifb/ 57obj-$(CONFIG_FB_XGI) += xgifb/
59obj-$(CONFIG_MSM_STAGING) += msm/ 58obj-$(CONFIG_MSM_STAGING) += msm/
60obj-$(CONFIG_EASYCAP) += easycap/ 59obj-$(CONFIG_EASYCAP) += easycap/
diff --git a/drivers/staging/ti-st/Kconfig b/drivers/staging/ti-st/Kconfig
deleted file mode 100644
index 074b8e89e91..00000000000
--- a/drivers/staging/ti-st/Kconfig
+++ /dev/null
@@ -1,14 +0,0 @@
1#
2# TI's shared transport line discipline and the protocol
3# drivers (BT, FM and GPS)
4#
5menu "Texas Instruments shared transport line discipline"
6config ST_BT
7 tristate "BlueZ bluetooth driver for ST"
8 depends on BT && RFKILL
9 select TI_ST
10 help
11 This enables the Bluetooth driver for TI BT/FM/GPS combo devices.
12 This makes use of shared transport line discipline core driver to
13 communicate with the BT core of the combo chip.
14endmenu
diff --git a/drivers/staging/ti-st/Makefile b/drivers/staging/ti-st/Makefile
deleted file mode 100644
index 9125462807d..00000000000
--- a/drivers/staging/ti-st/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
1#
2# Makefile for TI's shared transport line discipline
3# and its protocol drivers (BT, FM, GPS)
4#
5obj-$(CONFIG_ST_BT) += btwilink.o
diff --git a/drivers/staging/ti-st/TODO b/drivers/staging/ti-st/TODO
deleted file mode 100644
index ebfd6bb6017..00000000000
--- a/drivers/staging/ti-st/TODO
+++ /dev/null
@@ -1,8 +0,0 @@
1TODO:
2
31. Step up and maintain this driver to ensure that it continues
4to work. Having the hardware for this is pretty much a
5requirement. If this does not happen, the will be removed in
6the 2.6.35 kernel release.
7
8Please send patches to Greg Kroah-Hartman <greg@kroah.com>.
diff --git a/drivers/staging/ti-st/btwilink.c b/drivers/staging/ti-st/btwilink.c
deleted file mode 100644
index 71e69f8394c..00000000000
--- a/drivers/staging/ti-st/btwilink.c
+++ /dev/null
@@ -1,363 +0,0 @@
1/*
2 * Texas Instrument's Bluetooth Driver For Shared Transport.
3 *
4 * Bluetooth Driver acts as interface between HCI core and
5 * TI Shared Transport Layer.
6 *
7 * Copyright (C) 2009-2010 Texas Instruments
8 * Author: Raja Mani <raja_mani@ti.com>
9 * Pavan Savoy <pavan_savoy@ti.com>
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 *
24 */
25
26#include <linux/platform_device.h>
27#include <net/bluetooth/bluetooth.h>
28#include <net/bluetooth/hci_core.h>
29
30#include <linux/ti_wilink_st.h>
31
32/* Bluetooth Driver Version */
33#define VERSION "1.0"
34
35/* Number of seconds to wait for registration completion
36 * when ST returns PENDING status.
37 */
38#define BT_REGISTER_TIMEOUT 6000 /* 6 sec */
39
40/**
41 * struct ti_st - driver operation structure
42 * @hdev: hci device pointer which binds to bt driver
43 * @reg_status: ST registration callback status
44 * @st_write: write function provided by the ST driver
45 * to be used by the driver during send_frame.
46 * @wait_reg_completion - completion sync between ti_st_open
47 * and ti_st_registration_completion_cb.
48 */
49struct ti_st {
50 struct hci_dev *hdev;
51 char reg_status;
52 long (*st_write) (struct sk_buff *);
53 struct completion wait_reg_completion;
54};
55
56/* Increments HCI counters based on pocket ID (cmd,acl,sco) */
57static inline void ti_st_tx_complete(struct ti_st *hst, int pkt_type)
58{
59 struct hci_dev *hdev = hst->hdev;
60
61 /* Update HCI stat counters */
62 switch (pkt_type) {
63 case HCI_COMMAND_PKT:
64 hdev->stat.cmd_tx++;
65 break;
66
67 case HCI_ACLDATA_PKT:
68 hdev->stat.acl_tx++;
69 break;
70
71 case HCI_SCODATA_PKT:
72 hdev->stat.sco_tx++;
73 break;
74 }
75}
76
77/* ------- Interfaces to Shared Transport ------ */
78
79/* Called by ST layer to indicate protocol registration completion
80 * status.ti_st_open() function will wait for signal from this
81 * API when st_register() function returns ST_PENDING.
82 */
83static void st_registration_completion_cb(void *priv_data, char data)
84{
85 struct ti_st *lhst = priv_data;
86
87 /* Save registration status for use in ti_st_open() */
88 lhst->reg_status = data;
89 /* complete the wait in ti_st_open() */
90 complete(&lhst->wait_reg_completion);
91}
92
93/* Called by Shared Transport layer when receive data is
94 * available */
95static long st_receive(void *priv_data, struct sk_buff *skb)
96{
97 struct ti_st *lhst = priv_data;
98 int err;
99
100 if (!skb)
101 return -EFAULT;
102
103 if (!lhst) {
104 kfree_skb(skb);
105 return -EFAULT;
106 }
107
108 skb->dev = (void *) lhst->hdev;
109
110 /* Forward skb to HCI core layer */
111 err = hci_recv_frame(skb);
112 if (err < 0) {
113 BT_ERR("Unable to push skb to HCI core(%d)", err);
114 return err;
115 }
116
117 lhst->hdev->stat.byte_rx += skb->len;
118
119 return 0;
120}
121
122/* ------- Interfaces to HCI layer ------ */
123/* protocol structure registered with shared transport */
124static struct st_proto_s ti_st_proto = {
125 .type = ST_BT,
126 .recv = st_receive,
127 .reg_complete_cb = st_registration_completion_cb,
128};
129
130/* Called from HCI core to initialize the device */
131static int ti_st_open(struct hci_dev *hdev)
132{
133 unsigned long timeleft;
134 struct ti_st *hst;
135 int err;
136
137 BT_DBG("%s %p", hdev->name, hdev);
138 if (test_and_set_bit(HCI_RUNNING, &hdev->flags)) {
139 BT_ERR("btwilink already opened");
140 return -EBUSY;
141 }
142
143 /* provide contexts for callbacks from ST */
144 hst = hdev->driver_data;
145 ti_st_proto.priv_data = hst;
146
147 err = st_register(&ti_st_proto);
148 if (err == -EINPROGRESS) {
149 /* ST is busy with either protocol registration or firmware
150 * download.
151 */
152 /* Prepare wait-for-completion handler data structures.
153 */
154 init_completion(&hst->wait_reg_completion);
155
156 /* Reset ST registration callback status flag , this value
157 * will be updated in ti_st_registration_completion_cb()
158 * function whenever it called from ST driver.
159 */
160 hst->reg_status = -EINPROGRESS;
161
162 BT_DBG("waiting for registration completion signal from ST");
163 timeleft = wait_for_completion_timeout
164 (&hst->wait_reg_completion,
165 msecs_to_jiffies(BT_REGISTER_TIMEOUT));
166 if (!timeleft) {
167 clear_bit(HCI_RUNNING, &hdev->flags);
168 BT_ERR("Timeout(%d sec),didn't get reg "
169 "completion signal from ST",
170 BT_REGISTER_TIMEOUT / 1000);
171 return -ETIMEDOUT;
172 }
173
174 /* Is ST registration callback called with ERROR status? */
175 if (hst->reg_status != 0) {
176 clear_bit(HCI_RUNNING, &hdev->flags);
177 BT_ERR("ST registration completed with invalid "
178 "status %d", hst->reg_status);
179 return -EAGAIN;
180 }
181 err = 0;
182 } else if (err != 0) {
183 clear_bit(HCI_RUNNING, &hdev->flags);
184 BT_ERR("st_register failed %d", err);
185 return err;
186 }
187
188 /* ti_st_proto.write is filled up by the underlying shared
189 * transport driver upon registration
190 */
191 hst->st_write = ti_st_proto.write;
192 if (!hst->st_write) {
193 BT_ERR("undefined ST write function");
194 clear_bit(HCI_RUNNING, &hdev->flags);
195
196 /* Undo registration with ST */
197 err = st_unregister(ST_BT);
198 if (err)
199 BT_ERR("st_unregister() failed with error %d", err);
200
201 hst->st_write = NULL;
202 return err;
203 }
204
205 return err;
206}
207
208/* Close device */
209static int ti_st_close(struct hci_dev *hdev)
210{
211 int err;
212 struct ti_st *hst = hdev->driver_data;
213
214 if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags))
215 return 0;
216
217 /* continue to unregister from transport */
218 err = st_unregister(ST_BT);
219 if (err)
220 BT_ERR("st_unregister() failed with error %d", err);
221
222 hst->st_write = NULL;
223
224 return err;
225}
226
227static int ti_st_send_frame(struct sk_buff *skb)
228{
229 struct hci_dev *hdev;
230 struct ti_st *hst;
231 long len;
232
233 hdev = (struct hci_dev *)skb->dev;
234
235 if (!test_bit(HCI_RUNNING, &hdev->flags))
236 return -EBUSY;
237
238 hst = hdev->driver_data;
239
240 /* Prepend skb with frame type */
241 memcpy(skb_push(skb, 1), &bt_cb(skb)->pkt_type, 1);
242
243 BT_DBG("%s: type %d len %d", hdev->name, bt_cb(skb)->pkt_type,
244 skb->len);
245
246 /* Insert skb to shared transport layer's transmit queue.
247 * Freeing skb memory is taken care in shared transport layer,
248 * so don't free skb memory here.
249 */
250 len = hst->st_write(skb);
251 if (len < 0) {
252 kfree_skb(skb);
253 BT_ERR("ST write failed (%ld)", len);
254 /* Try Again, would only fail if UART has gone bad */
255 return -EAGAIN;
256 }
257
258 /* ST accepted our skb. So, Go ahead and do rest */
259 hdev->stat.byte_tx += len;
260 ti_st_tx_complete(hst, bt_cb(skb)->pkt_type);
261
262 return 0;
263}
264
265static void ti_st_destruct(struct hci_dev *hdev)
266{
267 BT_DBG("%s", hdev->name);
268 kfree(hdev->driver_data);
269}
270
271static int bt_ti_probe(struct platform_device *pdev)
272{
273 static struct ti_st *hst;
274 struct hci_dev *hdev;
275 int err;
276
277 hst = kzalloc(sizeof(struct ti_st), GFP_KERNEL);
278 if (!hst)
279 return -ENOMEM;
280
281 /* Expose "hciX" device to user space */
282 hdev = hci_alloc_dev();
283 if (!hdev) {
284 kfree(hst);
285 return -ENOMEM;
286 }
287
288 BT_DBG("hdev %p", hdev);
289
290 hst->hdev = hdev;
291 hdev->bus = HCI_UART;
292 hdev->driver_data = hst;
293 hdev->open = ti_st_open;
294 hdev->close = ti_st_close;
295 hdev->flush = NULL;
296 hdev->send = ti_st_send_frame;
297 hdev->destruct = ti_st_destruct;
298 hdev->owner = THIS_MODULE;
299
300 err = hci_register_dev(hdev);
301 if (err < 0) {
302 BT_ERR("Can't register HCI device error %d", err);
303 kfree(hst);
304 hci_free_dev(hdev);
305 return err;
306 }
307
308 BT_DBG("HCI device registered (hdev %p)", hdev);
309
310 dev_set_drvdata(&pdev->dev, hst);
311 return err;
312}
313
314static int bt_ti_remove(struct platform_device *pdev)
315{
316 struct hci_dev *hdev;
317 struct ti_st *hst = dev_get_drvdata(&pdev->dev);
318
319 if (!hst)
320 return -EFAULT;
321
322 hdev = hst->hdev;
323 ti_st_close(hdev);
324 hci_unregister_dev(hdev);
325
326 hci_free_dev(hdev);
327 kfree(hst);
328
329 dev_set_drvdata(&pdev->dev, NULL);
330 return 0;
331}
332
333static struct platform_driver btwilink_driver = {
334 .probe = bt_ti_probe,
335 .remove = bt_ti_remove,
336 .driver = {
337 .name = "btwilink",
338 .owner = THIS_MODULE,
339 },
340};
341
342/* ------- Module Init/Exit interfaces ------ */
343static int __init btwilink_init(void)
344{
345 BT_INFO("Bluetooth Driver for TI WiLink - Version %s", VERSION);
346
347 return platform_driver_register(&btwilink_driver);
348}
349
350static void __exit btwilink_exit(void)
351{
352 platform_driver_unregister(&btwilink_driver);
353}
354
355module_init(btwilink_init);
356module_exit(btwilink_exit);
357
358/* ------ Module Info ------ */
359
360MODULE_AUTHOR("Raja Mani <raja_mani@ti.com>");
361MODULE_DESCRIPTION("Bluetooth Driver for TI Shared Transport" VERSION);
362MODULE_VERSION(VERSION);
363MODULE_LICENSE("GPL");
diff --git a/drivers/staging/ti-st/sysfs-uim b/drivers/staging/ti-st/sysfs-uim
deleted file mode 100644
index 626bda51ee8..00000000000
--- a/drivers/staging/ti-st/sysfs-uim
+++ /dev/null
@@ -1,28 +0,0 @@
1What: /sys/class/rfkill/rfkill%d/
2Date: March 22
3Contact: Pavan Savoy <pavan_savoy@ti.com>
4Description:
5 Creates the rfkill entries for Radio apps like
6 BT app, FM app or GPS app to toggle corresponding
7 cores of the chip
8
9What: /dev/rfkill
10Date: March 22
11Contact: Pavan Savoy <pavan_savoy@ti.com>
12Description:
13 A daemon which maintains the ldisc installation and
14 uninstallation would be ppolling on this device and listening
15 on events which would suggest either to install or un-install
16 line discipline
17
18What: /sys/kernel/debug/ti-st/version
19Contact: Pavan Savoy <pavan_savoy@ti.com>
20Description:
21 WiLink chip's ROM version exposed to user-space for some
22 proprietary protocol stacks to make use of.
23
24What: /sys/kernel/debug/ti-st/protocols
25Contact: Pavan Savoy <pavan_savoy@ti.com>
26Description:
27 The reason for chip being ON, the list of protocols registered.
28