Commit 4cbf87c7 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'for-upstream' of...

Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next



Johan Hedberg says:

====================
pull request: bluetooth-next 2017-06-14

Here's another batch of Bluetooth patches for the 4.13 kernel:

 - Fix for Broadcom controllers not supporting Event Mask Page 2
 - New QCA ROME USB ID for btusb
 - Fix for Security Manager Protocol to use constant-time memcmp
 - Improved support for TI WiLink chips

Please let me know if there are any issues pulling. Thanks.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 0331402a 06e41d8a
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
@@ -14,6 +14,12 @@ Required properties:
 - compatible: should be one of the following:
 - compatible: should be one of the following:
    "ti,wl1271-st"
    "ti,wl1271-st"
    "ti,wl1273-st"
    "ti,wl1273-st"
    "ti,wl1281-st"
    "ti,wl1283-st"
    "ti,wl1285-st"
    "ti,wl1801-st"
    "ti,wl1805-st"
    "ti,wl1807-st"
    "ti,wl1831-st"
    "ti,wl1831-st"
    "ti,wl1835-st"
    "ti,wl1835-st"
    "ti,wl1837-st"
    "ti,wl1837-st"
@@ -22,6 +28,10 @@ Optional properties:
 - enable-gpios : GPIO signal controlling enabling of BT. Active high.
 - enable-gpios : GPIO signal controlling enabling of BT. Active high.
 - vio-supply : Vio input supply (1.8V)
 - vio-supply : Vio input supply (1.8V)
 - vbat-supply : Vbat input supply (2.9-4.8V)
 - vbat-supply : Vbat input supply (2.9-4.8V)
 - clocks : Must contain an entry, for each entry in clock-names.
   See ../clocks/clock-bindings.txt for details.
 - clock-names : Must include the following entry:
   "ext_clock" (External clock provided to the TI combo chip).


Example:
Example:


@@ -31,5 +41,7 @@ Example:
	bluetooth {
	bluetooth {
		compatible = "ti,wl1835-st";
		compatible = "ti,wl1835-st";
		enable-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
		enable-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
		clocks = <&clk32k_wl18xx>;
		clock-names = "ext_clock";
	};
	};
};
};
+2 −0
Original line number Original line Diff line number Diff line
@@ -141,6 +141,8 @@
			bluetooth {
			bluetooth {
				compatible = "ti,wl1835-st";
				compatible = "ti,wl1835-st";
				enable-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
				enable-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
				clocks = <&pmic>;
				clock-names = "ext_clock";
			};
			};
		};
		};


+36 −0
Original line number Original line Diff line number Diff line
@@ -246,6 +246,27 @@ static struct sk_buff *btbcm_read_verbose_config(struct hci_dev *hdev)
	return skb;
	return skb;
}
}


static struct sk_buff *btbcm_read_controller_features(struct hci_dev *hdev)
{
	struct sk_buff *skb;

	skb = __hci_cmd_sync(hdev, 0xfc6e, 0, NULL, HCI_INIT_TIMEOUT);
	if (IS_ERR(skb)) {
		BT_ERR("%s: BCM: Read controller features failed (%ld)",
		       hdev->name, PTR_ERR(skb));
		return skb;
	}

	if (skb->len != 9) {
		BT_ERR("%s: BCM: Controller features length mismatch",
		       hdev->name);
		kfree_skb(skb);
		return ERR_PTR(-EIO);
	}

	return skb;
}

static struct sk_buff *btbcm_read_usb_product(struct hci_dev *hdev)
static struct sk_buff *btbcm_read_usb_product(struct hci_dev *hdev)
{
{
	struct sk_buff *skb;
	struct sk_buff *skb;
@@ -417,6 +438,14 @@ int btbcm_setup_patchram(struct hci_dev *hdev)
	BT_INFO("%s: BCM: chip id %u", hdev->name, skb->data[1]);
	BT_INFO("%s: BCM: chip id %u", hdev->name, skb->data[1]);
	kfree_skb(skb);
	kfree_skb(skb);


	/* Read Controller Features */
	skb = btbcm_read_controller_features(hdev);
	if (IS_ERR(skb))
		return PTR_ERR(skb);

	BT_INFO("%s: BCM: features 0x%2.2x", hdev->name, skb->data[1]);
	kfree_skb(skb);

	/* Read Local Name */
	/* Read Local Name */
	skb = btbcm_read_local_name(hdev);
	skb = btbcm_read_local_name(hdev);
	if (IS_ERR(skb))
	if (IS_ERR(skb))
@@ -540,6 +569,13 @@ int btbcm_setup_apple(struct hci_dev *hdev)
		kfree_skb(skb);
		kfree_skb(skb);
	}
	}


	/* Read Controller Features */
	skb = btbcm_read_controller_features(hdev);
	if (!IS_ERR(skb)) {
		BT_INFO("%s: BCM: features 0x%2.2x", hdev->name, skb->data[1]);
		kfree_skb(skb);
	}

	/* Read Local Name */
	/* Read Local Name */
	skb = btbcm_read_local_name(hdev);
	skb = btbcm_read_local_name(hdev);
	if (!IS_ERR(skb)) {
	if (!IS_ERR(skb)) {
+1 −0
Original line number Original line Diff line number Diff line
@@ -266,6 +266,7 @@ static const struct usb_device_id blacklist_table[] = {
	{ USB_DEVICE(0x0cf3, 0xe301), .driver_info = BTUSB_QCA_ROME },
	{ USB_DEVICE(0x0cf3, 0xe301), .driver_info = BTUSB_QCA_ROME },
	{ USB_DEVICE(0x0cf3, 0xe360), .driver_info = BTUSB_QCA_ROME },
	{ USB_DEVICE(0x0cf3, 0xe360), .driver_info = BTUSB_QCA_ROME },
	{ USB_DEVICE(0x0489, 0xe092), .driver_info = BTUSB_QCA_ROME },
	{ USB_DEVICE(0x0489, 0xe092), .driver_info = BTUSB_QCA_ROME },
	{ USB_DEVICE(0x0489, 0xe0a2), .driver_info = BTUSB_QCA_ROME },
	{ USB_DEVICE(0x04ca, 0x3011), .driver_info = BTUSB_QCA_ROME },
	{ USB_DEVICE(0x04ca, 0x3011), .driver_info = BTUSB_QCA_ROME },


	/* Broadcom BCM2035 */
	/* Broadcom BCM2035 */
+1 −4
Original line number Original line Diff line number Diff line
@@ -762,8 +762,7 @@ static int bcm_acpi_probe(struct bcm_device *dev)
	if (id)
	if (id)
		gpio_mapping = (const struct acpi_gpio_mapping *) id->driver_data;
		gpio_mapping = (const struct acpi_gpio_mapping *) id->driver_data;


	ret = acpi_dev_add_driver_gpios(ACPI_COMPANION(&pdev->dev),
	ret = devm_acpi_dev_add_driver_gpios(&pdev->dev, gpio_mapping);
					gpio_mapping);
	if (ret)
	if (ret)
		return ret;
		return ret;


@@ -834,8 +833,6 @@ static int bcm_remove(struct platform_device *pdev)
	list_del(&dev->list);
	list_del(&dev->list);
	mutex_unlock(&bcm_device_lock);
	mutex_unlock(&bcm_device_lock);


	acpi_dev_remove_driver_gpios(ACPI_COMPANION(&pdev->dev));

	dev_info(&pdev->dev, "%s device unregistered.\n", dev->name);
	dev_info(&pdev->dev, "%s device unregistered.\n", dev->name);


	return 0;
	return 0;
Loading