mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-18 11:56:14 +07:00
Bluetooth: hci_intel: Enable IRQ wake capability
We need to explicitly enable the IRQ wakeup mode to let the controller wake the system from sleep states (like suspend-to-ram). PM suspend/resume callbacks now call the generic intel device PM functions after enabling/disabling IRQ wake. Signed-off-by: Loic Poulain <loic.poulain@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
30e945fb28
commit
f755247379
@ -1184,12 +1184,10 @@ static int intel_acpi_probe(struct intel_device *idev)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
static int intel_suspend(struct device *dev)
|
static int intel_suspend_device(struct device *dev)
|
||||||
{
|
{
|
||||||
struct intel_device *idev = dev_get_drvdata(dev);
|
struct intel_device *idev = dev_get_drvdata(dev);
|
||||||
|
|
||||||
dev_dbg(dev, "intel_suspend");
|
|
||||||
|
|
||||||
mutex_lock(&idev->hu_lock);
|
mutex_lock(&idev->hu_lock);
|
||||||
if (idev->hu)
|
if (idev->hu)
|
||||||
intel_lpm_suspend(idev->hu);
|
intel_lpm_suspend(idev->hu);
|
||||||
@ -1198,12 +1196,10 @@ static int intel_suspend(struct device *dev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int intel_resume(struct device *dev)
|
static int intel_resume_device(struct device *dev)
|
||||||
{
|
{
|
||||||
struct intel_device *idev = dev_get_drvdata(dev);
|
struct intel_device *idev = dev_get_drvdata(dev);
|
||||||
|
|
||||||
dev_dbg(dev, "intel_resume");
|
|
||||||
|
|
||||||
mutex_lock(&idev->hu_lock);
|
mutex_lock(&idev->hu_lock);
|
||||||
if (idev->hu)
|
if (idev->hu)
|
||||||
intel_lpm_resume(idev->hu);
|
intel_lpm_resume(idev->hu);
|
||||||
@ -1213,9 +1209,31 @@ static int intel_resume(struct device *dev)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_PM_SLEEP
|
||||||
|
static int intel_suspend(struct device *dev)
|
||||||
|
{
|
||||||
|
struct intel_device *idev = dev_get_drvdata(dev);
|
||||||
|
|
||||||
|
if (device_may_wakeup(dev))
|
||||||
|
enable_irq_wake(idev->irq);
|
||||||
|
|
||||||
|
return intel_suspend_device(dev);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int intel_resume(struct device *dev)
|
||||||
|
{
|
||||||
|
struct intel_device *idev = dev_get_drvdata(dev);
|
||||||
|
|
||||||
|
if (device_may_wakeup(dev))
|
||||||
|
disable_irq_wake(idev->irq);
|
||||||
|
|
||||||
|
return intel_resume_device(dev);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static const struct dev_pm_ops intel_pm_ops = {
|
static const struct dev_pm_ops intel_pm_ops = {
|
||||||
SET_SYSTEM_SLEEP_PM_OPS(intel_suspend, intel_resume)
|
SET_SYSTEM_SLEEP_PM_OPS(intel_suspend, intel_resume)
|
||||||
SET_RUNTIME_PM_OPS(intel_suspend, intel_resume, NULL)
|
SET_RUNTIME_PM_OPS(intel_suspend_device, intel_resume_device, NULL)
|
||||||
};
|
};
|
||||||
|
|
||||||
static int intel_probe(struct platform_device *pdev)
|
static int intel_probe(struct platform_device *pdev)
|
||||||
|
Loading…
Reference in New Issue
Block a user