Loading Documentation/devicetree/bindings/btmrvl.txt 0 → 100644 +29 −0 Original line number Diff line number Diff line btmrvl ------ Required properties: - compatible : must be "btmrvl,cfgdata" Optional properties: - btmrvl,cal-data : Calibration data downloaded to the device during initialization. This is an array of 28 values(u8). - btmrvl,gpio-gap : gpio and gap (in msecs) combination to be configured. Example: GPIO pin 13 is configured as a wakeup source and GAP is set to 100 msecs in below example. btmrvl { compatible = "btmrvl,cfgdata"; btmrvl,cal-data = /bits/ 8 < 0x37 0x01 0x1c 0x00 0xff 0xff 0xff 0xff 0x01 0x7f 0x04 0x02 0x00 0x00 0xba 0xce 0xc0 0xc6 0x2d 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xf0 0x00>; btmrvl,gpio-gap = <0x0d64>; }; drivers/bluetooth/ath3k.c +2 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,7 @@ static const struct usb_device_id ath3k_table[] = { { USB_DEVICE(0x13d3, 0x3375) }, { USB_DEVICE(0x13d3, 0x3393) }, { USB_DEVICE(0x13d3, 0x3402) }, { USB_DEVICE(0x13d3, 0x3408) }, { USB_DEVICE(0x13d3, 0x3432) }, /* Atheros AR5BBU12 with sflash firmware */ Loading Loading @@ -158,6 +159,7 @@ static const struct usb_device_id ath3k_blist_tbl[] = { { USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x13d3, 0x3393), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x13d3, 0x3402), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x13d3, 0x3408), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x13d3, 0x3432), .driver_info = BTUSB_ATH3012 }, /* Atheros AR5BBU22 with sflash firmware */ Loading drivers/bluetooth/btmrvl_main.c +30 −21 Original line number Diff line number Diff line Loading @@ -41,6 +41,11 @@ void btmrvl_interrupt(struct btmrvl_private *priv) priv->adapter->int_count++; if (priv->adapter->hs_state == HS_ACTIVATED) { BT_DBG("BT: HS DEACTIVATED in ISR!\n"); priv->adapter->hs_state = HS_DEACTIVATED; } wake_up_interruptible(&priv->main_thread.wait_q); } EXPORT_SYMBOL_GPL(btmrvl_interrupt); Loading Loading @@ -323,6 +328,7 @@ int btmrvl_prepare_command(struct btmrvl_private *priv) } else { ret = priv->hw_wakeup_firmware(priv); priv->adapter->hs_state = HS_DEACTIVATED; BT_DBG("BT: HS DEACTIVATED due to host activity!\n"); } } Loading Loading @@ -492,30 +498,32 @@ static int btmrvl_download_cal_data(struct btmrvl_private *priv, return 0; } static int btmrvl_cal_data_dt(struct btmrvl_private *priv) static int btmrvl_check_device_tree(struct btmrvl_private *priv) { struct device_node *dt_node; u8 cal_data[BT_CAL_HDR_LEN + BT_CAL_DATA_SIZE]; const char name[] = "btmrvl_caldata"; const char property[] = "btmrvl,caldata"; int ret; u32 val; dt_node = of_find_node_by_name(NULL, name); if (!dt_node) return -ENODEV; for_each_compatible_node(dt_node, NULL, "btmrvl,cfgdata") { ret = of_property_read_u32(dt_node, "btmrvl,gpio-gap", &val); if (!ret) priv->btmrvl_dev.gpio_gap = val; ret = of_property_read_u8_array(dt_node, property, ret = of_property_read_u8_array(dt_node, "btmrvl,cal-data", cal_data + BT_CAL_HDR_LEN, BT_CAL_DATA_SIZE); if (ret) return ret; BT_DBG("Use cal data from device tree"); ret = btmrvl_download_cal_data(priv, cal_data, BT_CAL_DATA_SIZE); ret = btmrvl_download_cal_data(priv, cal_data, BT_CAL_DATA_SIZE); if (ret) { BT_ERR("Fail to download calibrate data"); return ret; } } return 0; } Loading @@ -526,14 +534,15 @@ static int btmrvl_setup(struct hci_dev *hdev) btmrvl_send_module_cfg_cmd(priv, MODULE_BRINGUP_REQ); btmrvl_cal_data_dt(priv); priv->btmrvl_dev.gpio_gap = 0xffff; btmrvl_check_device_tree(priv); btmrvl_pscan_window_reporting(priv, 0x01); priv->btmrvl_dev.psmode = 1; btmrvl_enable_ps(priv); priv->btmrvl_dev.gpio_gap = 0xffff; btmrvl_send_hscfg_cmd(priv); return 0; Loading drivers/bluetooth/btusb.c +1 −0 Original line number Diff line number Diff line Loading @@ -185,6 +185,7 @@ static const struct usb_device_id blacklist_table[] = { { USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x13d3, 0x3393), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x13d3, 0x3402), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x13d3, 0x3408), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x13d3, 0x3432), .driver_info = BTUSB_ATH3012 }, /* Atheros AR5BBU12 with sflash firmware */ Loading include/net/bluetooth/hci_core.h +1 −0 Original line number Diff line number Diff line Loading @@ -130,6 +130,7 @@ struct smp_irk { struct link_key { struct list_head list; struct rcu_head rcu; bdaddr_t bdaddr; u8 type; u8 val[HCI_LINK_KEY_SIZE]; Loading Loading
Documentation/devicetree/bindings/btmrvl.txt 0 → 100644 +29 −0 Original line number Diff line number Diff line btmrvl ------ Required properties: - compatible : must be "btmrvl,cfgdata" Optional properties: - btmrvl,cal-data : Calibration data downloaded to the device during initialization. This is an array of 28 values(u8). - btmrvl,gpio-gap : gpio and gap (in msecs) combination to be configured. Example: GPIO pin 13 is configured as a wakeup source and GAP is set to 100 msecs in below example. btmrvl { compatible = "btmrvl,cfgdata"; btmrvl,cal-data = /bits/ 8 < 0x37 0x01 0x1c 0x00 0xff 0xff 0xff 0xff 0x01 0x7f 0x04 0x02 0x00 0x00 0xba 0xce 0xc0 0xc6 0x2d 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xf0 0x00>; btmrvl,gpio-gap = <0x0d64>; };
drivers/bluetooth/ath3k.c +2 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,7 @@ static const struct usb_device_id ath3k_table[] = { { USB_DEVICE(0x13d3, 0x3375) }, { USB_DEVICE(0x13d3, 0x3393) }, { USB_DEVICE(0x13d3, 0x3402) }, { USB_DEVICE(0x13d3, 0x3408) }, { USB_DEVICE(0x13d3, 0x3432) }, /* Atheros AR5BBU12 with sflash firmware */ Loading Loading @@ -158,6 +159,7 @@ static const struct usb_device_id ath3k_blist_tbl[] = { { USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x13d3, 0x3393), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x13d3, 0x3402), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x13d3, 0x3408), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x13d3, 0x3432), .driver_info = BTUSB_ATH3012 }, /* Atheros AR5BBU22 with sflash firmware */ Loading
drivers/bluetooth/btmrvl_main.c +30 −21 Original line number Diff line number Diff line Loading @@ -41,6 +41,11 @@ void btmrvl_interrupt(struct btmrvl_private *priv) priv->adapter->int_count++; if (priv->adapter->hs_state == HS_ACTIVATED) { BT_DBG("BT: HS DEACTIVATED in ISR!\n"); priv->adapter->hs_state = HS_DEACTIVATED; } wake_up_interruptible(&priv->main_thread.wait_q); } EXPORT_SYMBOL_GPL(btmrvl_interrupt); Loading Loading @@ -323,6 +328,7 @@ int btmrvl_prepare_command(struct btmrvl_private *priv) } else { ret = priv->hw_wakeup_firmware(priv); priv->adapter->hs_state = HS_DEACTIVATED; BT_DBG("BT: HS DEACTIVATED due to host activity!\n"); } } Loading Loading @@ -492,30 +498,32 @@ static int btmrvl_download_cal_data(struct btmrvl_private *priv, return 0; } static int btmrvl_cal_data_dt(struct btmrvl_private *priv) static int btmrvl_check_device_tree(struct btmrvl_private *priv) { struct device_node *dt_node; u8 cal_data[BT_CAL_HDR_LEN + BT_CAL_DATA_SIZE]; const char name[] = "btmrvl_caldata"; const char property[] = "btmrvl,caldata"; int ret; u32 val; dt_node = of_find_node_by_name(NULL, name); if (!dt_node) return -ENODEV; for_each_compatible_node(dt_node, NULL, "btmrvl,cfgdata") { ret = of_property_read_u32(dt_node, "btmrvl,gpio-gap", &val); if (!ret) priv->btmrvl_dev.gpio_gap = val; ret = of_property_read_u8_array(dt_node, property, ret = of_property_read_u8_array(dt_node, "btmrvl,cal-data", cal_data + BT_CAL_HDR_LEN, BT_CAL_DATA_SIZE); if (ret) return ret; BT_DBG("Use cal data from device tree"); ret = btmrvl_download_cal_data(priv, cal_data, BT_CAL_DATA_SIZE); ret = btmrvl_download_cal_data(priv, cal_data, BT_CAL_DATA_SIZE); if (ret) { BT_ERR("Fail to download calibrate data"); return ret; } } return 0; } Loading @@ -526,14 +534,15 @@ static int btmrvl_setup(struct hci_dev *hdev) btmrvl_send_module_cfg_cmd(priv, MODULE_BRINGUP_REQ); btmrvl_cal_data_dt(priv); priv->btmrvl_dev.gpio_gap = 0xffff; btmrvl_check_device_tree(priv); btmrvl_pscan_window_reporting(priv, 0x01); priv->btmrvl_dev.psmode = 1; btmrvl_enable_ps(priv); priv->btmrvl_dev.gpio_gap = 0xffff; btmrvl_send_hscfg_cmd(priv); return 0; Loading
drivers/bluetooth/btusb.c +1 −0 Original line number Diff line number Diff line Loading @@ -185,6 +185,7 @@ static const struct usb_device_id blacklist_table[] = { { USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x13d3, 0x3393), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x13d3, 0x3402), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x13d3, 0x3408), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x13d3, 0x3432), .driver_info = BTUSB_ATH3012 }, /* Atheros AR5BBU12 with sflash firmware */ Loading
include/net/bluetooth/hci_core.h +1 −0 Original line number Diff line number Diff line Loading @@ -130,6 +130,7 @@ struct smp_irk { struct link_key { struct list_head list; struct rcu_head rcu; bdaddr_t bdaddr; u8 type; u8 val[HCI_LINK_KEY_SIZE]; Loading