]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
Bluetooth: hci_bcm: respect IRQ polarity from DT
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>
Thu, 2 Apr 2020 12:55:18 +0000 (14:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Jun 2020 07:33:01 +0000 (09:33 +0200)
commit b25e4df4a83e516efbdeeefb5b2d3e259639a56e upstream.

The IRQ polarity is be configured in bcm_setup_sleep(). Make the
configured value match what is in the DeviceTree.

Cc: stable@vger.kernel.org
Fixes: f25a96c8eb46 ("Bluetooth: hci_bcm: enable IRQ capability from devicetree")
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/bluetooth/hci_bcm.c

index b236cb11c0dcce208fe6567479f6a423f74c3514..36b7f0d00c4b5e255d57b5320bc631053a22e759 100644 (file)
@@ -1153,7 +1153,8 @@ static int bcm_of_probe(struct bcm_device *bdev)
        device_property_read_u8_array(bdev->dev, "brcm,bt-pcm-int-params",
                                      bdev->pcm_int_params, 5);
        bdev->irq = of_irq_get_byname(bdev->dev->of_node, "host-wakeup");
-
+       bdev->irq_active_low = irq_get_trigger_type(bdev->irq)
+                            & (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_LEVEL_LOW);
        return 0;
 }