From 0bdb080c70495ea4efbed7661b4fe6100bd5adde Mon Sep 17 00:00:00 2001 From: Dominik Sliwa Date: Thu, 21 Feb 2019 10:23:08 +0100 Subject: Revert "backports: Remove unused parts" This reverts commit ab3fd3b9a801a9faa2619e2e65207e736f859a6d. --- patches/0062-acpi-gpio-remove/hci_bcm.patch | 78 +++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 patches/0062-acpi-gpio-remove/hci_bcm.patch (limited to 'patches/0062-acpi-gpio-remove/hci_bcm.patch') diff --git a/patches/0062-acpi-gpio-remove/hci_bcm.patch b/patches/0062-acpi-gpio-remove/hci_bcm.patch new file mode 100644 index 00000000..77e343ee --- /dev/null +++ b/patches/0062-acpi-gpio-remove/hci_bcm.patch @@ -0,0 +1,78 @@ +--- a/drivers/bluetooth/hci_bcm.c ++++ b/drivers/bluetooth/hci_bcm.c +@@ -29,7 +29,9 @@ + #include + #include + #include ++#if LINUX_VERSION_IS_GEQ(3,13,0) + #include ++#endif + #include + #include + #include +@@ -148,8 +150,10 @@ static int bcm_gpio_set_power(struct bcm + if (powered && !IS_ERR(dev->clk) && !dev->clk_enabled) + clk_enable(dev->clk); + ++#if LINUX_VERSION_IS_GEQ(3,13,0) + gpiod_set_value(dev->shutdown, powered); + gpiod_set_value(dev->device_wakeup, powered); ++#endif + + if (!powered && !IS_ERR(dev->clk) && dev->clk_enabled) + clk_disable(dev->clk); +@@ -520,7 +524,9 @@ static int bcm_suspend_device(struct dev + + /* Suspend the device */ + if (bdev->device_wakeup) { ++#if LINUX_VERSION_IS_GEQ(3,13,0) + gpiod_set_value(bdev->device_wakeup, false); ++#endif + bt_dev_dbg(bdev, "suspend, delaying 15 ms"); + mdelay(15); + } +@@ -535,7 +541,9 @@ static int bcm_resume_device(struct devi + bt_dev_dbg(bdev, ""); + + if (bdev->device_wakeup) { ++#if LINUX_VERSION_IS_GEQ(3,13,0) + gpiod_set_value(bdev->device_wakeup, true); ++#endif + bt_dev_dbg(bdev, "resume, delaying 15 ms"); + mdelay(15); + } +@@ -618,6 +626,7 @@ unlock: + } + #endif + ++#if defined(CONFIG_ACPI) && LINUX_VERSION_IS_GEQ(3,19,0) + static const struct acpi_gpio_params device_wakeup_gpios = { 0, 0, false }; + static const struct acpi_gpio_params shutdown_gpios = { 1, 0, false }; + static const struct acpi_gpio_params host_wakeup_gpios = { 2, 0, false }; +@@ -629,7 +638,6 @@ static const struct acpi_gpio_mapping ac + { }, + }; + +-#ifdef CONFIG_ACPI + static u8 acpi_active_low = ACPI_ACTIVE_LOW; + + /* IRQ polarity of some chipsets are not defined correctly in ACPI table. */ +@@ -812,7 +820,7 @@ static const struct hci_uart_proto bcm_p + .dequeue = bcm_dequeue, + }; + +-#ifdef CONFIG_ACPI ++#if defined(CONFIG_ACPI) && LINUX_VERSION_IS_GEQ(3,19,0) + static const struct acpi_device_id bcm_acpi_match[] = { + { "BCM2E1A", 0 }, + { "BCM2E39", 0 }, +@@ -843,7 +851,9 @@ static struct platform_driver bcm_driver + .remove = bcm_remove, + .driver = { + .name = "hci_bcm", ++#if LINUX_VERSION_IS_GEQ(3,19,0) + .acpi_match_table = ACPI_PTR(bcm_acpi_match), ++#endif + .pm = &bcm_pm_ops, + }, + }; -- cgit v1.2.3