All of lore.kernel.org
 help / color / mirror / Atom feed
From: Loic Poulain <loic.poulain@intel.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: linux-bluetooth@vger.kernel.org, gaetan.prin@intel.com
Subject: Re: [PATCH 1/5] Bluetooth: hci_intel: Retrieve host-wake IRQ
Date: Thu, 27 Aug 2015 19:27:53 +0200	[thread overview]
Message-ID: <55DF4899.9000907@intel.com> (raw)
In-Reply-To: <94E2FA7D-93BE-48A5-8A23-FB35EECE009D@holtmann.org>

Hi Marcel,

>> +	idev->irq = platform_get_irq(pdev, 0);
>> +	if (idev->irq < 0) {
>> +		struct gpio_desc *host_wake;
>> +
>> +		dev_err(&pdev->dev, "No IRQ, falling back to gpio-irq\n");
>> +
>> +		host_wake = devm_gpiod_get_optional(&pdev->dev, "host-wake",
>> +						    GPIOD_IN);
>> +		if (IS_ERR(host_wake)) {
>> +			dev_err(&pdev->dev, "Unable to retrieve IRQ\n");
>> +			goto no_irq;
>> +		}
>> +
>> +		idev->irq = gpiod_to_irq(host_wake);
>> +		if (idev->irq < 0) {
>> +			dev_err(&pdev->dev, "No corresponding irq for gpio\n");
>> +			goto no_irq;
>> +		}
>> +	}
>> +
>> +	err = devm_request_threaded_irq(&pdev->dev, idev->irq, NULL, intel_irq,
>> +					IRQF_ONESHOT, "bt-host-wake", idev);
>> +	if (err) {
>> +		dev_err(&pdev->dev, "unable to allocate irq\n");
>> +		return err;
>> +	}
>> +
>> +	device_init_wakeup(&pdev->dev, true);
>
> do you really want to do this in probe? Meaning that as soon as we boot, we claim this interrupt. Isn't it better to do this when the line discipline gets attached.


Is it ok to move the irq request/free in intel_set_power?

Regards,
Loic

-- 
Intel Open Source Technology Center
http://oss.intel.com/

  reply	other threads:[~2015-08-27 17:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-27 15:39 [PATCH 1/5] Bluetooth: hci_intel: Retrieve host-wake IRQ Loic Poulain
2015-08-27 15:39 ` [PATCH 2/5] Bluetooth: hci_intel: Add intel_device_get function Loic Poulain
2015-08-27 16:33   ` Marcel Holtmann
2015-08-27 15:39 ` [PATCH 3/5] Bluetooth: hci_intel: Introduce LPM support Loic Poulain
2015-08-27 16:16   ` Marcel Holtmann
2015-08-27 15:39 ` [PATCH 4/5] Bluetooth: hci_intel: Add intel_data_list Loic Poulain
2015-08-27 16:21   ` Marcel Holtmann
2015-08-27 17:38     ` Loic Poulain
2015-08-27 17:48       ` Marcel Holtmann
2015-08-27 15:39 ` [PATCH 5/5] Bluetooth: hci_intel: Implement suspend/resume Loic Poulain
2015-08-27 16:29   ` Marcel Holtmann
2015-08-27 16:18 ` [PATCH 1/5] Bluetooth: hci_intel: Retrieve host-wake IRQ Marcel Holtmann
2015-08-27 17:27   ` Loic Poulain [this message]
2015-08-27 17:47     ` 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=55DF4899.9000907@intel.com \
    --to=loic.poulain@intel.com \
    --cc=gaetan.prin@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.