From: Hans de Goede <hdegoede@redhat.com>
To: "Frédéric Danis" <frederic.danis.oss@gmail.com>,
"Marcel Holtmann" <marcel@holtmann.org>,
"Gustavo Padovan" <gustavo@padovan.org>,
"Johan Hedberg" <johan.hedberg@gmail.com>
Cc: Sebastian Reichel <sre@kernel.org>,
robh@kernel.org, linux-bluetooth@vger.kernel.org,
linux-serial@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: Re: [PATCH 7/9] Bluetooth: hci_bcm: Make acpi_probe get irq from ACPI resources
Date: Wed, 4 Oct 2017 15:26:57 +0200 [thread overview]
Message-ID: <e648b8ea-923a-6053-e43b-3f48e36d1eb9@redhat.com> (raw)
In-Reply-To: <c06ae2d7-9628-ad70-2509-eca18ba16f0a@gmail.com>
Hi,
On 03-10-17 19:21, Frédéric Danis wrote:
> Hi Hans,
>
> First of all, many thanks for your work on this, it helped me a lot to get full Bluetooth on my Asus T100.
You're welcome thank you for your patches tying everything
together, it will be good to have this all finally working
OOTB.
> Le 02/10/2017 à 17:23, Hans de Goede a écrit :
>> The ACPI subsys is going to move over to instantiating ACPI enumerated
>> HCIs as serdevs, rather then as platform devices.
>>
>> So we need to make bcm_acpi_probe() suitable for use on non platform-
>> devices too, which means that we cannot rely on platform_get_irq()
>> getting called.
>>
>> This commit modifies bcm_acpi_probe() to directly get the irq from
>> the ACPI resources, this is a preparation patch for adding (runtime)pm
>> support to the serdev path.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>> drivers/bluetooth/hci_bcm.c | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>>
>> diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
>> index 5c8371d8aace..48a428909958 100644
>> --- a/drivers/bluetooth/hci_bcm.c
>> +++ b/drivers/bluetooth/hci_bcm.c
>> @@ -805,6 +805,7 @@ static int bcm_acpi_probe(struct bcm_device *dev)
>> const struct dmi_system_id *dmi_id;
>> const struct acpi_gpio_mapping *gpio_mapping = acpi_bcm_int_last_gpios;
>> const struct acpi_device_id *id;
>> + struct resource_entry *entry;
>> int ret;
>> /* Retrieve GPIO data */
>> @@ -821,6 +822,13 @@ static int bcm_acpi_probe(struct bcm_device *dev)
>> &resources, bcm_resource, dev);
>> if (ret < 0)
>> return ret;
>> +
>> + resource_list_for_each_entry(entry, &resources) {
>> + if (resource_type(entry->res) == IORESOURCE_IRQ) {
>> + dev->irq = entry->res->start;
>> + break;
>> + }
>> + }
>> acpi_dev_free_resource_list(&resources);
>> dmi_id = dmi_first_match(bcm_active_low_irq_dmi_table);
>
> You should also return 0 in bcm_resource(), otherwise the resources list is empty, ending up with "BCM irq: -22" trace in dmesg.
Right, good one. I did not notice that as on the device I was testing with
the IRQ is specified in the DSDT as a GpioInt rather as an Interrupt.
Fixed for v2 of this series.
Regards,
Hans
next prev parent reply other threads:[~2017-10-04 13:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-02 15:23 [PATCH 0/9] Bluetooth: hci_bcm: Add (runtime)pm support to the serdev drv Hans de Goede
2017-10-02 15:23 ` [PATCH 1/9] Bluetooth: hci_uart_set_flow_control: Fix NULL deref when using serdev Hans de Goede
2017-10-02 22:34 ` Sebastian Reichel
2017-10-04 18:42 ` Hans de Goede
2017-10-02 15:23 ` [PATCH 2/9] Bluetooth: hci_bcm: Fix setting of irq trigger type Hans de Goede
2017-10-02 15:23 ` [PATCH 3/9] Bluetooth: hci_bcm: Move bcm_platform_probe call out of bcm_acpi_probe Hans de Goede
2017-10-02 15:23 ` [PATCH 4/9] Bluetooth: hci_bcm: Move platform_get_irq call to bcm_probe Hans de Goede
2017-10-02 15:23 ` [PATCH 5/9] Bluetooth: hci_bcm: Store device pointer instead of platform_device pointer Hans de Goede
2017-10-02 15:23 ` [PATCH 6/9] Bluetooth: hci_bcm: Rename bcm_platform_probe to bcm_get_resources Hans de Goede
2017-10-02 15:23 ` [PATCH 7/9] Bluetooth: hci_bcm: Make acpi_probe get irq from ACPI resources Hans de Goede
2017-10-03 17:21 ` Frédéric Danis
2017-10-04 13:26 ` Hans de Goede [this message]
2017-10-02 15:23 ` [PATCH 8/9] Bluetooth: hci_bcm: Make suspend/resume functions platform_dev independent Hans de Goede
2017-10-02 15:23 ` [PATCH 9/9] Bluetooth: hci_bcm: Add (runtime)pm support to the serdev driver Hans de Goede
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=e648b8ea-923a-6053-e43b-3f48e36d1eb9@redhat.com \
--to=hdegoede@redhat.com \
--cc=frederic.danis.oss@gmail.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=robh@kernel.org \
--cc=sre@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).