diff options
author | Dominik Sliwa <dominik.sliwa@toradex.com> | 2019-02-21 11:35:20 +0100 |
---|---|---|
committer | Dominik Sliwa <dominik.sliwa@toradex.com> | 2019-02-21 14:07:51 +0100 |
commit | 36735bb86a5e144603743bb800d7f69362d2ee2d (patch) | |
tree | 363158c7f80f3fc5a7690ca9d9ff6e5fcd7fa52e /patches/0062-acpi-gpio-remove | |
parent | e7720369ef69376d1244b49373e34663eaa6b5a1 (diff) |
backports: reintroduce bluetooth support
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Diffstat (limited to 'patches/0062-acpi-gpio-remove')
-rw-r--r-- | patches/0062-acpi-gpio-remove/hci_bcm.patch | 47 | ||||
-rw-r--r-- | patches/0062-acpi-gpio-remove/hci_intel.patch | 9 |
2 files changed, 4 insertions, 52 deletions
diff --git a/patches/0062-acpi-gpio-remove/hci_bcm.patch b/patches/0062-acpi-gpio-remove/hci_bcm.patch index 77e343ee..92f2245e 100644 --- a/patches/0062-acpi-gpio-remove/hci_bcm.patch +++ b/patches/0062-acpi-gpio-remove/hci_bcm.patch @@ -10,53 +10,6 @@ #include <linux/tty.h> #include <linux/interrupt.h> #include <linux/dmi.h> -@@ -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, }; diff --git a/patches/0062-acpi-gpio-remove/hci_intel.patch b/patches/0062-acpi-gpio-remove/hci_intel.patch index 9237ce97..32dfa6de 100644 --- a/patches/0062-acpi-gpio-remove/hci_intel.patch +++ b/patches/0062-acpi-gpio-remove/hci_intel.patch @@ -20,13 +20,12 @@ /* Provide to idev a hu reference which is used to run LPM * transactions (lpm suspend/resume) from PM callbacks. -@@ -1306,14 +1310,17 @@ static int intel_probe(struct platform_d - - idev->pdev = pdev; +@@ -1306,13 +1310,16 @@ static int intel_probe(struct platform_d + if (ret) + dev_dbg(&pdev->dev, "Unable to add GPIO mapping table\n"); +#if LINUX_VERSION_IS_GEQ(3,17,0) - idev->reset = devm_gpiod_get_optional(&pdev->dev, "reset", - GPIOD_OUT_LOW); + idev->reset = devm_gpiod_get(&pdev->dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(idev->reset)) { dev_err(&pdev->dev, "Unable to retrieve gpio\n"); return PTR_ERR(idev->reset); |