|
From: <z7...@us...> - 2007-05-16 12:24:11
|
Revision: 973
http://svn.sourceforge.net/hackndev/?rev=973&view=rev
Author: z72ka
Date: 2007-05-16 05:24:06 -0700 (Wed, 16 May 2007)
Log Message:
-----------
PalmTX: Added bluetooth stuff
Modified Paths:
--------------
linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c 2007-05-05 20:34:45 UTC (rev 972)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c 2007-05-16 12:24:06 UTC (rev 973)
@@ -221,6 +221,56 @@
.transceiver_mode = palmtx_irda_transceiver_mode,
};
+/**************
+ * Bluetooth *
+ **************/
+
+void bcm2035_bt_reset(int on)
+{
+ printk(KERN_NOTICE "Switch BT reset %d\n", on);
+ if (on)
+ SET_PALMTX_GPIO( BT_RESET, 1 );
+ else
+ SET_PALMTX_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_PALMTX_GPIO( BT_POWER, 1 );
+ else
+ SET_PALMTX_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,
+ },
+};
+
/*******
* USB *
*******/
@@ -376,6 +426,7 @@
pxa_gpio_mode(GPIO31_SYNC_AC97_MD);
set_pxa_fb_info ( &palmtx_lcd_screen );
+ pxa_set_btuart_info(&bcm2035_pxa_bt_funcs);
pxa_set_mci_info ( &palmtx_mci_platform_data );
pxa_set_udc_info ( &palmtx_udc_mach_info );
pxa_set_ficp_info ( &palmtx_ficp_platform_data );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|