This patch tries to add code to actually power up the bluetooth chip (bcm2035) once BTUART is opened from userspace. Unfortunately it doesn't really work yet. Index: linux-2.6.16.13-ezx3/arch/arm/mach-pxa/ezx.c =================================================================== --- linux-2.6.16.13-ezx3.orig/arch/arm/mach-pxa/ezx.c 2006-05-12 00:24:20.000000000 +0200 +++ linux-2.6.16.13-ezx3/arch/arm/mach-pxa/ezx.c 2006-05-12 01:23:41.000000000 +0200 @@ -58,6 +58,26 @@ extern void usb_send_readurb(void); extern void pm_do_poweroff(void); +/* Bluetooth stuff */ +void ezx_bt_wakeup(int on) +{ + printk(KERN_NOTICE "switching BT wakeup %d\n", on); + if (on) + set_GPIO(GPIO_BT_WAKEUP); + else + clr_GPIO(GPIO_BT_WAKEUP); +} +EXPORT_SYMBOL(ezx_bt_wakeup); + +void ezx_bt_reset(int on) +{ + printk(KERN_NOTICE "switching BT reset %d\n", on); + if (on) + set_GPIO(GPIO_BT_RESET); + else + clr_GPIO(GPIO_BT_RESET); +} +EXPORT_SYMBOL(ezx_bt_reset); /* check power down condition */ inline void check_power_off(void) Index: linux-2.6.16.13-ezx3/drivers/serial/pxa.c =================================================================== --- linux-2.6.16.13-ezx3.orig/drivers/serial/pxa.c 2006-05-12 00:21:45.000000000 +0200 +++ linux-2.6.16.13-ezx3/drivers/serial/pxa.c 2006-05-12 01:24:06.000000000 +0200 @@ -417,6 +417,14 @@ (void) serial_in(up, UART_IIR); (void) serial_in(up, UART_MSR); +#ifdef CONFIG_PXA_EZX + if (port->line == 1) { + ezx_bt_reset(0); + ezx_bt_wakeup(0); + ezx_bt_reset(1); + } +#endif + return 0; } @@ -446,6 +454,11 @@ UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT); serial_out(up, UART_FCR, 0); + +#ifdef CONFIG_PXA_EZX + if (port->line == 1) + ezx_bt_wakeup(1); +#endif } static void