htcleo: add BT address config
This commit is contained in:
parent
b30bd1a64c
commit
4105944c60
@ -18,9 +18,9 @@ obj-$(CONFIG_ARCH_MSM_SCORPION) += idle-v7.o
|
||||
obj-y += gpio.o generic_gpio.o
|
||||
obj-y += nand_partitions.o
|
||||
obj-y += drv_callback.o
|
||||
obj-$(CONFIG_ARCH_QSD8X50) += pmic.o htc_bluetooth.o
|
||||
obj-$(CONFIG_ARCH_QSD8X50) += pmic.o
|
||||
ifndef CONFIG_MACH_HTCLEO
|
||||
obj-$(CONFIG_ARCH_QSD8X50) += htc_wifi_nvs.o
|
||||
obj-$(CONFIG_ARCH_QSD8X50) += htc_wifi_nvs.o htc_bluetooth.o
|
||||
else
|
||||
obj-$(CONFIG_ARCH_QSD8X50) += board-htcleo-wifi-nvs.o
|
||||
endif
|
||||
|
@ -38,8 +38,8 @@
|
||||
#include "dex_comm.h"
|
||||
#include "gpio_chip.h"
|
||||
|
||||
|
||||
|
||||
#define MAX_BT_SIZE 0x6U
|
||||
static unsigned char bt_bd_ram[MAX_BT_SIZE] = {0x50,0xC3,0x00,0x00,0x00,0x00};
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -47,6 +47,10 @@
|
||||
static struct rfkill *bt_rfk;
|
||||
static const char bt_name[] = "bcm4329";
|
||||
|
||||
unsigned char *get_bt_bd_ram(void)
|
||||
{
|
||||
return (bt_bd_ram);
|
||||
}
|
||||
|
||||
static int bluetooth_set_power(void *data, bool blocked)
|
||||
{
|
||||
|
@ -62,6 +62,7 @@
|
||||
|
||||
extern int __init htcleo_init_mmc(unsigned debug_uart);
|
||||
extern void __init htcleo_audio_init(void);
|
||||
extern unsigned char *get_bt_bd_ram(void);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
// SPI
|
||||
@ -459,6 +460,18 @@ static struct platform_device msm_camera_sensor_s5k3e2fx =
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
// bluetooth
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
static char bdaddress[20];
|
||||
static void bt_export_bd_address(void)
|
||||
{
|
||||
unsigned char cTemp[6];
|
||||
|
||||
memcpy(cTemp, get_bt_bd_ram(), 6);
|
||||
sprintf(bdaddress, "%02x:%02x:%02x:%02x:%02x:%02x", cTemp[0], cTemp[1], cTemp[2], cTemp[3], cTemp[4], cTemp[5]);
|
||||
pr_info("BD_ADDRESS=%s\n", bdaddress);
|
||||
}
|
||||
|
||||
module_param_string(bdaddress, bdaddress, sizeof(bdaddress), S_IWUSR | S_IRUGO);
|
||||
MODULE_PARM_DESC(bdaddress, "BT MAC ADDRESS");
|
||||
|
||||
static uint32_t bt_gpio_table[] =
|
||||
{
|
||||
@ -794,6 +807,7 @@ static void __init htcleo_init(void)
|
||||
htcleo_init_mmc(0);
|
||||
platform_device_register(&htcleo_timed_gpios);
|
||||
|
||||
bt_export_bd_address();
|
||||
htcleo_bt_init();
|
||||
htcleo_audio_init();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user