static void hsuart_power(int on) { if (on) { msm_hs_request_clock_on(bsi->uport); msm_hs_set_mctrl(bsi->uport, TIOCM_RTS); } else { msm_hs_set_mctrl(bsi->uport, 0); msm_hs_request_clock_off(bsi->uport); } }
/* * Local functions */ static void hsuart_power(int on) { if (test_bit(BT_SUSPEND, &flags)) return; pr_info("HSUART CLOCK: %s\n", on ? "ON" : "OFF"); if (on) { msm_hs_request_clock_on(bsi->uport); msm_hs_set_mctrl(bsi->uport, TIOCM_RTS); } else { msm_hs_set_mctrl(bsi->uport, 0); msm_hs_request_clock_off(bsi->uport); } }
/* * Local functions */ static void hsuart_power(int on) { if (on) { printk("%s, (1)\n", __func__); msm_hs_request_clock_on(bsi->uport); //printk("%s, (msm_hs_request_clock_on)\n", __func__); msm_hs_set_mctrl(bsi->uport, TIOCM_RTS); //printk("%s, (msm_hs_set_mctrl)\n", __func__); } else { printk("%s, (0)\n", __func__); msm_hs_set_mctrl(bsi->uport, 0); msm_hs_request_clock_off(bsi->uport); } }
static void __brcm_msm_serial_clock_on(struct tty_struct *tty) { struct uart_state *state = tty->driver_data; /* struct uart_port *port = state->port;*/ struct uart_port *port = state->uart_port; msm_hs_request_clock_on(port); msm_hs_set_mctrl(port, TIOCM_RTS); }
static void hsuart_power(int on) { if(NULL == gsi->uport) { GS_ERR("gsi->uport is null"); return; } if (on) { msm_hs_request_clock_on(gsi->uport); msm_hs_set_mctrl(gsi->uport, TIOCM_RTS); GS_ERR("$$hsuart_power on!"); } else { msm_hs_set_mctrl(gsi->uport, 0); msm_hs_request_clock_off(gsi->uport); GS_ERR("$$hsuart_power off!"); } }
static void hsuart_power(int on) { int clk_state; if (test_bit(BT_SUSPEND, &flags)) { BT_DBG("it's suspend state. waiting for resume."); return; } if (!bsi->uport) { BT_DBG("hsuart_power called. But uport is null"); return; } if (on && bluesleep_get_uart_clock_count() >= 1) { BT_DBG("hsuart_power called. But HS Uart clock count is %d", bluesleep_get_uart_clock_count()); return; } if (on) { if(test_bit(BT_TXDATA, &flags)) { BT_DBG("hsuart_power on"); msm_hs_request_clock_on(bsi->uport); msm_hs_set_mctrl(bsi->uport, TIOCM_RTS); return; } clk_state = bluesleep_get_uart_state(); if(clk_state == MSM_HS_CLK_REQUEST_OFF) { BT_DBG("hsuart_power wait"); bluesleep_uart_work(); } else { BT_DBG("hsuart_power on"); msm_hs_request_clock_on(bsi->uport); msm_hs_set_mctrl(bsi->uport, TIOCM_RTS); } } else { BT_DBG("hsuart_power off"); msm_hs_set_mctrl(bsi->uport, 0); msm_hs_request_clock_off(bsi->uport); } }
static int bluesleep_resume(struct platform_device *pdev) { if (test_bit(BT_SUSPEND, &flags)) { if (debug_mask & DEBUG_SUSPEND) pr_info("bluesleep resuming...\n"); if ((bsi->uport != NULL) && (gpio_get_value(bsi->host_wake) == bsi->irq_polarity)) { if (debug_mask & DEBUG_SUSPEND) pr_info("bluesleep resume from BT event...\n"); msm_hs_request_clock_on(bsi->uport); msm_hs_set_mctrl(bsi->uport, TIOCM_RTS); } clear_bit(BT_SUSPEND, &flags); } return 0; }
static void bluesleep_uart_awake_work(struct work_struct *work) { int clk_state; if (!bsi->uport) { BT_DBG("hsuart_power called. But uport is null"); return; } clk_state = bluesleep_get_uart_state(); if (clk_state == MSM_HS_CLK_OFF) { BT_DBG("bluesleep_uart_awake_work : hsuart_power on"); msm_hs_request_clock_on(bsi->uport); msm_hs_set_mctrl(bsi->uport, TIOCM_RTS); }else if(clk_state == MSM_HS_CLK_REQUEST_OFF){ bluesleep_uart_work(); } }