From: Hans de Goede <hdegoede@redhat.com>
To: Marcel Holtmann <marcel@holtmann.org>,
Gustavo Padovan <gustavo@padovan.org>,
Johan Hedberg <johan.hedberg@gmail.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
linux-bluetooth@vger.kernel.org, linux-serial@vger.kernel.org,
linux-acpi@vger.kernel.org, stable@vger.kernel.org
Subject: [PATCH 1/5] Bluetooth: hci_bcm: Add irq_polarity module option
Date: Fri, 16 Mar 2018 21:28:07 +0100 [thread overview]
Message-ID: <20180316202811.5678-1-hdegoede@redhat.com> (raw)
Add irq_polarity module option for easier troubleshooting of irq-polarity
issues.
Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/bluetooth/hci_bcm.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
index 5e3aba3c3185..bb6cd1623132 100644
--- a/drivers/bluetooth/hci_bcm.c
+++ b/drivers/bluetooth/hci_bcm.c
@@ -126,6 +126,10 @@ struct bcm_data {
static DEFINE_MUTEX(bcm_device_lock);
static LIST_HEAD(bcm_device_list);
+static int irq_polarity = -1;
+module_param(irq_polarity, int, 0444);
+MODULE_PARM_DESC(irq_polarity, "IRQ polarity 0: active-high 1: active-low");
+
static inline void host_set_baudrate(struct hci_uart *hu, unsigned int speed)
{
if (hu->serdev)
@@ -988,11 +992,17 @@ static int bcm_acpi_probe(struct bcm_device *dev)
}
acpi_dev_free_resource_list(&resources);
- dmi_id = dmi_first_match(bcm_active_low_irq_dmi_table);
- if (dmi_id) {
- dev_warn(dev->dev, "%s: Overwriting IRQ polarity to active low",
- dmi_id->ident);
- dev->irq_active_low = true;
+ if (irq_polarity != -1) {
+ dev->irq_active_low = irq_polarity;
+ dev_warn(dev->dev, "Overwriting IRQ polarity to active %s by module-param\n",
+ dev->irq_active_low ? "low" : "high");
+ } else {
+ dmi_id = dmi_first_match(bcm_active_low_irq_dmi_table);
+ if (dmi_id) {
+ dev_warn(dev->dev, "%s: Overwriting IRQ polarity to active low",
+ dmi_id->ident);
+ dev->irq_active_low = true;
+ }
}
return 0;
--
2.14.3
next reply other threads:[~2018-03-16 20:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-16 20:28 Hans de Goede [this message]
2018-03-16 20:28 ` [PATCH 2/5] Bluetooth: hci_bcm: Treat Interrupt ACPI resources as always being active-low Hans de Goede
2018-03-16 20:28 ` [PATCH 3/5] Bluetooth: hci_bcm: Add 6 new ACPI HIDs Hans de Goede
2018-03-23 10:56 ` [PATCH 1/5] Bluetooth: hci_bcm: Add irq_polarity module option Hans de Goede
2018-03-23 11:16 ` Marcel Holtmann
2018-03-23 11:17 ` Hans de Goede
2018-03-23 11:23 ` Marcel Holtmann
2018-03-23 11:30 ` Hans de Goede
2018-03-23 20:51 ` Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180316202811.5678-1-hdegoede@redhat.com \
--to=hdegoede@redhat.com \
--cc=gustavo@padovan.org \
--cc=johan.hedberg@gmail.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).