This patch enable Bluetooth on Medfield platform with TI WL1273 connectivity boards. The steps to have Bluetooth functional are: > /usr/bin/uim /dev/ttyMFD0 3500000 1 22 & > rfkill unblock Bluetooth > modprobe bt_drv
Regards -------------------------------------------------- Sébastien Busson System Integration Engineer CELAD on behalf of UMG - MIPE - WSIV Intel France 134 av Eisenhower BP 72329 31023 Toulouse Cedex 1 France ------------------------------------------------------------------------------------ >From 8a8c1712bc2a11cbf438fca5b6c290ef4565941e Mon Sep 17 00:00:00 2001 From: Sebastien Busson <[email protected]> Date: Wed, 17 Nov 2010 13:48:01 +0100 Subject: [PATCH] mrst.c: Add btfm_init to enable bluetooth Called btfm_init to get BT_enable gpio from SFI table and register the Shared Transport. Called uim with the line discipline set to 22 to enable bluetooth. Signed-off-by: Sebastien Busson <[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 0df1eed..fbca07c 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> @@ -1133,6 +1135,31 @@ void *wl12xx_platform_data_init(void *info) return &mid_wifi_control; } +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 const struct devs_id device_ids[] = { {"pmic_gpio", SFI_DEV_TYPE_SPI, 1, &pmic_gpio_platform_data}, {"pmic_gpio", SFI_DEV_TYPE_IPC, 1, &pmic_gpio_platform_data}, @@ -1259,6 +1286,10 @@ void intel_scu_devices_create(void) if (retval < 0) pr_err("error platform_device_register\n"); + retval = btfm_init(); + if (retval < 0) + pr_err("error btfm_init : %d\n", retval); + sdhci_pci_request_regulators(); } EXPORT_SYMBOL_GPL(intel_scu_devices_create); -- 1.7.2.3 --------------------------------------------------------------------- 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.
0001-mrst.c-Add-btfm_init-to-enable-bluetooth.patch
Description: 0001-mrst.c-Add-btfm_init-to-enable-bluetooth.patch
_______________________________________________ MeeGo-kernel mailing list [email protected] http://lists.meego.com/listinfo/meego-kernel
