]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
Bluetooth: hci_bcm: Fix setting of irq trigger type
authorHans de Goede <hdegoede@redhat.com>
Wed, 4 Oct 2017 18:43:36 +0000 (20:43 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 6 Oct 2017 18:35:48 +0000 (20:35 +0200)
commit227630cccdbb8f8a1b24ac26517b75079c9a69c9
tree0c9f68737524fbbb281c12652f9b97e6951a6da0
parent7841d554809b518a22349e7e39b6b63f8a48d0fb
Bluetooth: hci_bcm: Fix setting of irq trigger type

This commit fixes 2 issues with host-wake irq trigger type handling
in hci_bcm:

1) bcm_setup_sleep sets sleep_params.host_wake_active based on
bcm_device.irq_polarity, but bcm_request_irq was always requesting
IRQF_TRIGGER_RISING as trigger type independent of irq_polarity.

This was a problem when the irq is described as a GpioInt rather then
an Interrupt in the DSDT as for GpioInt-s the value passed to request_irq
is honored. This commit fixes this by requesting the correct trigger
type depending on bcm_device.irq_polarity.

2) bcm_device.irq_polarity was used to directly store an ACPI polarity
value (ACPI_ACTIVE_*). This is undesirable because hci_bcm is also
used with device-tree and checking for something like ACPI_ACTIVE_LOW
in a non ACPI specific function like bcm_request_irq feels wrong.

This commit fixes this by renaming irq_polarity to irq_active_low
and changing its type to a bool.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/hci_bcm.c