Exemplo n.º 1
0
int bcm2076_bluetooth_suspend(struct platform_device *pdev, pm_message_t state)
{
#if BT_HOST_WAKE_INT_ENABLED
	int irq = gpio_to_irq(BT_HOST_WAKE_GPIO);
	int host_wake;

	disable_irq(irq);
	host_wake = gpio_get_value(BT_HOST_WAKE_GPIO);

	if (host_wake) {
		enable_irq(irq);
		return -EBUSY;
	}

	//Mux RTS pin into GPIO PULL UP pin (this flows off the 2076)
	pr_debug("** suspend ** changing RTS pin to GPIO pulled up\n");
	omap_rts_mux_write(MUX_PULL_UP, UART2);

#else
	pr_debug( "%s: BT_HOST_WAKE disabled\n",__FUNCTION__);
#endif //BT_HOST_WAKE_INT_ENABLED

	if( idme_query_board_type( IDME_BOARD_TYPE_TATE_EVT2 ) )
	omap_serial_ext_uart_disable(UART2);

	return 0;
}
Exemplo n.º 2
0
static void SetupUartSuspend()
{
	if( idme_query_board_type( IDME_BOARD_TYPE_TATE_EVT2 ) )
	{
		// disable uart suspend
		printk("uart auto suspend - disabled\n");
		blaze_uart2_info.auto_sus_timeout = -1;
	}
	else
	{
		printk("uart auto suspend - enabled\n");
	}
}
Exemplo n.º 3
0
int bcm2076_bluetooth_resume(struct platform_device *pdev)
{
#if BT_HOST_WAKE_INT_ENABLED
	int irq = gpio_to_irq(BT_HOST_WAKE_GPIO);
	enable_irq(irq);
#else
	pr_debug( "%s: BT_HOST_WAKE disabled\n",__FUNCTION__);
#endif //BT_HOST_WAKE_INT_ENABLED

	//Mux back GPIO PULL UP pin in RTS pin
	pr_debug("** resume ** changing RTS pin from GPIO back to RTS\n");
	omap_rts_mux_write(0, UART2);

	if( idme_query_board_type( IDME_BOARD_TYPE_TATE_EVT2 ) )
	omap_serial_ext_uart_enable(UART2);

	return 0;
}