|
From: <med...@us...> - 2007-07-15 15:11:25
|
Revision: 1154
http://svn.sourceforge.net/hackndev/?rev=1154&view=rev
Author: medaglia
Date: 2007-07-15 08:11:22 -0700 (Sun, 15 Jul 2007)
Log Message:
-----------
Added Bluetooth support for Palm Tungsten E2.
Modified Paths:
--------------
linux4palm/linux/trunk/arch/arm/mach-pxa/palmte2/palmte2.c
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmte2/palmte2.c
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmte2/palmte2.c 2007-07-15 15:09:46 UTC (rev 1153)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmte2/palmte2.c 2007-07-15 15:11:22 UTC (rev 1154)
@@ -28,7 +28,8 @@
#include <asm/arch/udc.h>
#include <asm/arch/mmc.h>
#include <asm/arch/pxapwm-bl.h>
-/*#include <asm/arch/palmte2-gpio.h>*/
+#include <asm/arch/serial.h>
+#include <asm/arch/palmte2-gpio.h>
#include <linux/gpio_keys.h>
#include <sound/driver.h>
@@ -62,7 +63,6 @@
},
};
-
/*
* Backlight
*/
@@ -83,6 +83,54 @@
};
/*
+ * Bluetooth
+ */
+
+void bcm2035_bt_reset(int on)
+{
+ printk(KERN_NOTICE "Switch BT reset %d\n", on);
+ if (on)
+ SET_PALMTE2_GPIO(BT_RESET, 1);
+ else
+ SET_PALMTE2_GPIO(BT_RESET, 0);
+}
+EXPORT_SYMBOL(bcm2035_bt_reset);
+
+void bcm2035_bt_power(int on)
+{
+ printk(KERN_NOTICE "Switch BT power %d\n", on);
+ if (on)
+ SET_PALMTE2_GPIO(BT_POWER, 1);
+ else
+ SET_PALMTE2_GPIO(BT_POWER, 0);
+}
+EXPORT_SYMBOL(bcm2035_bt_power);
+
+struct bcm2035_bt_funcs {
+ void (*configure) (int state);
+};
+
+static struct bcm2035_bt_funcs bt_funcs;
+
+static void bcm2035_bt_configure(int state)
+{
+ if (bt_funcs.configure != NULL)
+ bt_funcs.configure(state);
+}
+
+static struct platform_pxa_serial_funcs bcm2035_pxa_bt_funcs = {
+ .configure = bcm2035_bt_configure,
+};
+
+static struct platform_device bcm2035_bt = {
+ .name = "bcm2035-bt",
+ .id = -1,
+ .dev = {
+ .platform_data = &bt_funcs,
+ },
+};
+
+/*
* Keypad - gpio_keys
*/
@@ -153,15 +201,28 @@
&palmte2_pxa_keys,
#endif
&palmte2_backlight,
+ &bcm2035_bt,
};
static void __init palmte2_init(void)
{
+ /* int reg; */
+
GCR &= ~GCR_PRIRDY_IEN;
set_pxa_fb_info(&palmte2_lcd_screen);
+ pxa_set_btuart_info(&bcm2035_pxa_bt_funcs);
+
platform_add_devices(devices, ARRAY_SIZE(devices));
+
+/*
+ SET_GPIO(32, 0);
+ SET_GPIO(80, 0);
+
+ reg = __REG(0x40E0005C);
+ __REG(0x40E0005C) = (reg | 0x0FF00000);
+*/
}
MACHINE_START(TUNGE2, "Palm Tungsten E2")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|