Re: [PATCH 1/5] Bluetooth: hci_intel: Retrieve host-wake IRQ

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Loic,

>>> +	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?

I would assume so.

Regards

Marcel

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux