diff options
author | Bheemsen Kulkarni <x0099674@ti.com> | 2011-04-18 13:44:07 -0500 |
---|---|---|
committer | Dan Murphy <dmurphy@ti.com> | 2011-04-20 12:50:46 -0500 |
commit | 07a1ec73727e1faff43b0f35220476b708068ca9 (patch) | |
tree | 986cc1d956d629e2a10eb530cceb77ec1b9e8e1e | |
parent | 4d03f771bb38b584b48a7dbe69df1fc2c2ce5b34 (diff) | |
download | pandroid-07a1ec73727e1faff43b0f35220476b708068ca9.tar.gz |
OMAP4: BT : Added is_bt_active API to board file
This patch adds a API is_bt_active, which will return true
if BT state is active and false other than. is_bt_active" API
will initialise the vaialbe "plat_omap_bt_active" for UART 2.
To improve the BT file tranfer Tx throughput this API is added.
Change-Id: I81551b84afff2b775750d29192afec329212ba22
Signed-off-by: Bheemsen Kulkarni <x0099674@ti.com>
-rw-r--r-- | arch/arm/configs/android_4430_defconfig | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-4430sdp.c | 23 |
2 files changed, 22 insertions, 3 deletions
diff --git a/arch/arm/configs/android_4430_defconfig b/arch/arm/configs/android_4430_defconfig index 43b8f138c41..3fb87eaedde 100644 --- a/arch/arm/configs/android_4430_defconfig +++ b/arch/arm/configs/android_4430_defconfig @@ -834,7 +834,7 @@ CONFIG_UID_STAT=y # # Texas Instruments shared transport line discipline # -CONFIG_TI_ST=m +CONFIG_TI_ST=y CONFIG_HAVE_IDE=y # CONFIG_IDE is not set diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 4b146540a98..392f1a1c4f3 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c @@ -92,6 +92,7 @@ #define TWL6030_RTC_GPIO 6 #define BLUETOOTH_UART UART2 +#define BLUETOOTH_UART_DEV_NAME "/dev/ttyO1" #define CONSOLE_UART UART3 static struct wake_lock uart_lock; @@ -754,7 +755,7 @@ int plat_kim_resume(struct platform_device *pdev) /* wl128x BT, FM, GPS connectivity chip */ struct ti_st_plat_data wilink_pdata = { .nshutdown_gpio = 55, - .dev_name = "/dev/ttyO1", + .dev_name = BLUETOOTH_UART_DEV_NAME, .flow_cntrl = 1, .baud_rate = 3000000, .suspend = plat_kim_suspend, @@ -770,6 +771,24 @@ static struct platform_device btwilink_device = { .id = -1, }; +#ifdef CONFIG_TI_ST +static bool is_bt_active(void) +{ + struct platform_device *pdev; + struct kim_data_s *kim_gdata; + + pdev = &wl128x_device; + kim_gdata = dev_get_drvdata(&pdev->dev); + if (st_ll_getstate(kim_gdata->core_data) != ST_LL_ASLEEP && + st_ll_getstate(kim_gdata->core_data) != ST_LL_INVALID) + return true; + else + return false; +} +#else +#define is_bt_active NULL +#endif + static struct platform_device *sdp4430_devices[] __initdata = { &sdp4430_disp_led, &sdp4430_proximity_device, @@ -1637,7 +1656,7 @@ static struct omap_uart_port_info omap_serial_platform_data[] = { .idle_timeout = DEFAULT_IDLE_TIMEOUT, .flags = 1, .plat_hold_wakelock = plat_hold_wakelock, - .plat_omap_bt_active = NULL, + .plat_omap_bt_active = is_bt_active, .rts_padconf = OMAP4_CTRL_MODULE_PAD_UART2_RTS_OFFSET, .rts_override = 0, .cts_padconf = OMAP4_CTRL_MODULE_PAD_UART2_CTS_OFFSET, |