From: Frederic Danis <frederic.danis@linux.intel.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH v3 1/3] Bluetooth: hci_bcm: Fix IRQ polarity for T100
Date: Thu, 10 Sep 2015 11:33:57 +0200 [thread overview]
Message-ID: <55F14E85.6020703@linux.intel.com> (raw)
In-Reply-To: <8BF54238-1D33-421A-B46A-F8EA4A49145C@holtmann.org>
Hello Marcel,
On 09/09/2015 18:13, Marcel Holtmann wrote:
> Hi Fred,
>
>> ACPI table for BCM2E39 of T100TA is not correct.
>> Set correct irq_polarity for this device.
>>
>> Signed-off-by: Frederic Danis <frederic.danis@linux.intel.com>
>> ---
>> drivers/bluetooth/hci_bcm.c | 24 ++++++++++++++++++++++++
>> 1 file changed, 24 insertions(+)
>>
>> diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
>> index f306541..6551251 100644
>> --- a/drivers/bluetooth/hci_bcm.c
>> +++ b/drivers/bluetooth/hci_bcm.c
>> @@ -32,6 +32,7 @@
>> #include <linux/gpio/consumer.h>
>> #include <linux/tty.h>
>> #include <linux/interrupt.h>
>> +#include <linux/dmi.h>
>>
>> #include <net/bluetooth/bluetooth.h>
>> #include <net/bluetooth/hci_core.h>
>> @@ -513,6 +514,22 @@ static const struct acpi_gpio_mapping acpi_bcm_default_gpios[] = {
>> };
>>
>> #ifdef CONFIG_ACPI
>> +static u8 acpi_active_low = ACPI_ACTIVE_LOW;
>> +
>> +/* IRQ polarity of some chipsets are not defined correctly in ACPI table. */
>> +static const struct dmi_system_id bcm_wrong_irq_dmi_table[] = {
>> + {
>> + .ident = "Asus T100TA",
>> + .matches = {
>> + DMI_EXACT_MATCH(DMI_SYS_VENDOR,
>> + "ASUSTeK COMPUTER INC."),
>> + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T100TA"),
>> + },
>> + .driver_data = &acpi_active_low,
>> + },
>> + { }
>> +};
>> +
>> static int bcm_resource(struct acpi_resource *ares, void *data)
>> {
>> struct bcm_device *dev = data;
>> @@ -552,6 +569,7 @@ static int bcm_acpi_probe(struct bcm_device *dev)
>> const struct acpi_device_id *id;
>> struct acpi_device *adev;
>> LIST_HEAD(resources);
>> + const struct dmi_system_id *dmi_id;
>> int ret;
>>
>> id = acpi_match_device(pdev->dev.driver->acpi_match_table, &pdev->dev);
>> @@ -608,6 +626,12 @@ static int bcm_acpi_probe(struct bcm_device *dev)
>>
>> acpi_dev_get_resources(adev, &resources, bcm_resource, dev);
>>
>> + dmi_id = dmi_first_match(bcm_wrong_irq_dmi_table);
>> + if (dmi_id) {
>> + bt_dev_dbg(dev, "Fix irq polarity");
>
> I would actually make this bt_dev_warn, but we do not have that helper at the moment. Might be worth while adding it. These obvious bugs in firmware need to be pointed out and not quietly swallowed.
>
> Also lets be a bit more verbose with these things
>
> bt_dev_warn(dev, "%s: Overwriting IRQ polarity to active low", dmi->ident)
OK, I will do this change and add BT_WARN and bt_dev_warn logging macros.
Regards
Fred
next prev parent reply other threads:[~2015-09-10 9:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-09 7:54 [PATCH v3 0/3] Bluetooth: hci_bcm: Add wake-up and PM runtime support Frederic Danis
2015-09-09 7:54 ` [PATCH v3 1/3] Bluetooth: hci_bcm: Fix IRQ polarity for T100 Frederic Danis
2015-09-09 16:13 ` Marcel Holtmann
2015-09-10 9:33 ` Frederic Danis [this message]
2015-09-09 7:54 ` [PATCH v3 2/3] Bluetooth: hci_bcm: Prepare PM runtime support Frederic Danis
2015-09-09 16:18 ` Marcel Holtmann
2015-09-10 9:35 ` Frederic Danis
2015-09-09 7:54 ` [PATCH v3 3/3] Bluetooth: hci_bcm: Add suspend/resume runtime PM functions Frederic Danis
2015-09-09 16:29 ` Marcel Holtmann
2015-09-10 14:40 ` Frederic Danis
2015-09-11 9:44 ` Loic Poulain
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=55F14E85.6020703@linux.intel.com \
--to=frederic.danis@linux.intel.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.