>From 0b13aed255d4328f81f38979ae88017f03885f7a Mon Sep 17 00:00:00 2001 From: Eric Seibel <[email protected]> Date: Fri, 19 Nov 2010 00:16:51 +0100 Subject: [PATCH 6/6] mrst.c: Add btfm_init to enable bluetooth
btfm_init gets BT_enable gpio from SFI table and register to the Shared Transport. Signed-off-by: Sebastien Busson <[email protected]> Signed-off-by: Eric Seibel <[email protected]> --- arch/x86/kernel/mrst.c | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/mrst.c b/arch/x86/kernel/mrst.c index 75e652b..1e7219c 100644 --- a/arch/x86/kernel/mrst.c +++ b/arch/x86/kernel/mrst.c @@ -37,6 +37,8 @@ #include <linux/wl12xx.h> #include <linux/regulator/machine.h> #include <linux/regulator/fixed.h> +#include <linux/skbuff.h> +#include <linux/ti_wilink_st.h> #include <asm/setup.h> #include <asm/mpspec_def.h> @@ -1054,6 +1056,32 @@ struct sd_board_info { void *platform_data; }; #ifdef CONFIG_WL12XX_PLATFORM_DATA + +static int btfm_gpios[] = { + -1, /* BT */ + -1, /* FM */ + -1 +}; + +static struct platform_device linux_btfm_device = { + .name = "kim", /* named after init manager for ST */ + .id = -1, + .dev.platform_data = &btfm_gpios, +}; + +static int btfm_init(void) +{ + /* Get the GPIO number from the SFI table + if FM gpio is not provided then BT-reset line is + also used to enable FM + */ + btfm_gpios[ST_BT] = get_gpio_by_name("BT-reset"); + if (btfm_gpios[ST_BT] == -1) + return -ENODEV; + + return platform_device_register(&linux_btfm_device); +} + static struct wl12xx_platform_data mid_wifi_control = { .board_ref_clock = 2, .irq = 2, @@ -1153,6 +1181,9 @@ void wl12xx_platform_data_init_post_scu(void *info) pr_err("error platform_device_register\n"); sdhci_pci_request_regulators(); + err = btfm_init(); + if (err < 0) + pr_err("error btfm_init : %d\n", err); } void *wl12xx_platform_data_init(void *info) { -- 1.6.2.2 --------------------------------------------------------------------- Intel Corporation SAS (French simplified joint stock company) Registered headquarters: "Les Montalets"- 2, rue de Paris, 92196 Meudon Cedex, France Registration Number: 302 456 199 R.C.S. NANTERRE Capital: 4,572,000 Euros This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
0006-mrst.c-Add-btfm_init-to-enable-bluetooth.patch
Description: 0006-mrst.c-Add-btfm_init-to-enable-bluetooth.patch
_______________________________________________ MeeGo-kernel mailing list [email protected] http://lists.meego.com/listinfo/meego-kernel
