[kernel] refreshed layer7 patches for 2.6.26.8, 2.6.27.21, 2.6.28.9 and 2.6.29.1
[openwrt.git] / target / linux / pxa / patches-2.6.21 / 017-modular-init-bluetooth.patch
1 --- a/net/bluetooth/Kconfig
2 +++ b/net/bluetooth/Kconfig
3 @@ -30,6 +30,12 @@ menuconfig BT
4 Bluetooth kernel modules are provided in the BlueZ packages.
5 For more information, see <http://www.bluez.org/>.
6
7 +config BT_GUMSTIX
8 + tristate
9 + default m if BT=m
10 + default y if BT=y
11 + depends on BT && ARCH_GUMSTIX
12 +
13 config BT_L2CAP
14 tristate "L2CAP protocol support"
15 depends on BT
16 --- a/net/bluetooth/Makefile
17 +++ b/net/bluetooth/Makefile
18 @@ -9,5 +9,6 @@ obj-$(CONFIG_BT_RFCOMM) += rfcomm/
19 obj-$(CONFIG_BT_BNEP) += bnep/
20 obj-$(CONFIG_BT_CMTP) += cmtp/
21 obj-$(CONFIG_BT_HIDP) += hidp/
22 +obj-$(CONFIG_BT_GUMSTIX)+= gumstix_bluetooth.o
23
24 bluetooth-objs := af_bluetooth.o hci_core.o hci_conn.o hci_event.o hci_sock.o hci_sysfs.o lib.o
25 --- a/net/bluetooth/af_bluetooth.c
26 +++ b/net/bluetooth/af_bluetooth.c
27 @@ -327,12 +327,20 @@ static struct net_proto_family bt_sock_f
28 .create = bt_sock_create,
29 };
30
31 +#ifdef CONFIG_ARCH_GUMSTIX
32 +extern void gumstix_bluetooth_load(void);
33 +#endif
34 +
35 static int __init bt_init(void)
36 {
37 int err;
38
39 BT_INFO("Core ver %s", VERSION);
40
41 +#ifdef CONFIG_ARCH_GUMSTIX
42 + gumstix_bluetooth_load();
43 +#endif
44 +
45 err = bt_sysfs_init();
46 if (err < 0)
47 return err;
48 --- /dev/null
49 +++ b/net/bluetooth/gumstix_bluetooth.c
50 @@ -0,0 +1,50 @@
51 +/*
52 + * Gumstix bluetooth module intialization driver
53 + *
54 + * Author: Craig Hughes
55 + * Created: December 9, 2004
56 + * Copyright: (C) 2004 Craig Hughes
57 + *
58 + * This program is free software; you can redistribute it and/or modify
59 + * it under the terms of the GNU General Public License as published by
60 + * the Free Software Foundation; either version 2 of the License, or
61 + * (at your option) any later version.
62 + *
63 + */
64 +
65 +#include <linux/module.h>
66 +
67 +#include <asm/hardware.h>
68 +#include <asm/arch/pxa-regs.h>
69 +#include <asm/delay.h>
70 +
71 +#include <asm/arch/gumstix.h>
72 +
73 +static void gumstix_bluetooth_load(void)
74 +{
75 +}
76 +
77 +EXPORT_SYMBOL(gumstix_bluetooth_load);
78 +
79 +int __init gumstix_bluetooth_init(void)
80 +{
81 + /* Set up GPIOs to use the BTUART */
82 + pxa_gpio_mode(GPIO42_HWRXD_MD);
83 + pxa_gpio_mode(GPIO43_HWTXD_MD);
84 + pxa_gpio_mode(GPIO44_HWCTS_MD);
85 + pxa_gpio_mode(GPIO45_HWRTS_MD);
86 +
87 + return 0;
88 +}
89 +
90 +void __exit gumstix_bluetooth_exit(void)
91 +{
92 +}
93 +
94 +module_init(gumstix_bluetooth_init);
95 +module_exit(gumstix_bluetooth_exit);
96 +
97 +MODULE_LICENSE("GPL");
98 +MODULE_AUTHOR("Craig Hughes <craig@gumstix.com>");
99 +MODULE_DESCRIPTION("Gumstix board bluetooth module initialization driver");
100 +MODULE_VERSION("1:0.1");
This page took 0.048886 seconds and 5 git commands to generate.