mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
ACPI: allow a native cpuidle driver to displace ACPI
The ACPI driver would fail probe when it found that another driver had previously registered with cpuidle. But this is a natural situation, as a native hardware cpuidle driver should be able to bind instead of ACPI, and the ACPI processor driver should be able to handle yielding control of C-states while still handling P-states and T-states. Add a KERN_DEBUG line showing when acpi_idle does successfully register. Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
752138df0d
commit
541adf7cd9
@ -616,7 +616,8 @@ static int __cpuinit acpi_processor_add(struct acpi_device *device)
|
|||||||
acpi_processor_get_limit_info(pr);
|
acpi_processor_get_limit_info(pr);
|
||||||
|
|
||||||
|
|
||||||
acpi_processor_power_init(pr, device);
|
if (cpuidle_get_driver() == &acpi_idle_driver)
|
||||||
|
acpi_processor_power_init(pr, device);
|
||||||
|
|
||||||
pr->cdev = thermal_cooling_device_register("Processor", device,
|
pr->cdev = thermal_cooling_device_register("Processor", device,
|
||||||
&processor_cooling_ops);
|
&processor_cooling_ops);
|
||||||
@ -920,9 +921,10 @@ static int __init acpi_processor_init(void)
|
|||||||
if (!acpi_processor_dir)
|
if (!acpi_processor_dir)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
#endif
|
#endif
|
||||||
result = cpuidle_register_driver(&acpi_idle_driver);
|
|
||||||
if (result < 0)
|
if (!cpuidle_register_driver(&acpi_idle_driver))
|
||||||
goto out_proc;
|
printk(KERN_DEBUG "ACPI: %s registered with cpuidle\n",
|
||||||
|
acpi_idle_driver.name);
|
||||||
|
|
||||||
result = acpi_bus_register_driver(&acpi_processor_driver);
|
result = acpi_bus_register_driver(&acpi_processor_driver);
|
||||||
if (result < 0)
|
if (result < 0)
|
||||||
@ -941,7 +943,6 @@ static int __init acpi_processor_init(void)
|
|||||||
out_cpuidle:
|
out_cpuidle:
|
||||||
cpuidle_unregister_driver(&acpi_idle_driver);
|
cpuidle_unregister_driver(&acpi_idle_driver);
|
||||||
|
|
||||||
out_proc:
|
|
||||||
#ifdef CONFIG_ACPI_PROCFS
|
#ifdef CONFIG_ACPI_PROCFS
|
||||||
remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir);
|
remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user