From: <z7...@us...> - 2007-05-01 18:08:27
|
Revision: 965 http://svn.sourceforge.net/hackndev/?rev=965&view=rev Author: z72ka Date: 2007-05-01 11:08:03 -0700 (Tue, 01 May 2007) Log Message: ----------- palmz72: Added symbols for bluetooth bcm2035_uart driver Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72.c 2007-05-01 15:31:44 UTC (rev 964) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72.c 2007-05-01 18:08:03 UTC (rev 965) @@ -242,6 +242,56 @@ .transceiver_mode = palmz72_irda_transceiver_mode, }; +/************* + * Bluetooth * + *************/ + +void bcm2035_bt_reset(int on) +{ + printk(KERN_NOTICE "Switch BT reset %d\n", on); + if (on) + SET_PALMZ72_GPIO( BT_RESET, 1 ); + else + SET_PALMZ72_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_PALMZ72_GPIO( BT_POWER, 1 ); + else + SET_PALMZ72_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, + }, +}; + /************************* * AC97 audio controller * *************************/ @@ -352,7 +402,8 @@ #ifdef CONFIG_GPIO_KEYS &palmz72_pxa_keys, #endif - &palmz72_led_device, + &palmz72_led_device, + &bcm2035_bt, }; static void __init palmz72_init(void) @@ -382,6 +433,7 @@ } set_pxa_fb_info( &palmz72_lcd_screen ); + pxa_set_btuart_info(&bcm2035_pxa_bt_funcs); pxa_set_mci_info( &palmz72_mci_platform_data ); pxa_set_udc_info( &palmz72_udc_mach_info ); pxa_set_ficp_info( &palmz72_ficp_platform_data ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |