driver.txt 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. Supporting multiple CPU idle levels in kernel
  2. cpuidle drivers
  3. cpuidle driver hooks into the cpuidle infrastructure and handles the
  4. architecture/platform dependent part of CPU idle states. Driver
  5. provides the platform idle state detection capability and also
  6. has mechanisms in place to support actual entry-exit into CPU idle states.
  7. cpuidle driver initializes the cpuidle_device structure for each CPU device
  8. and registers with cpuidle using cpuidle_register_device.
  9. If all the idle states are the same, the wrapper function cpuidle_register
  10. could be used instead.
  11. It can also support the dynamic changes (like battery <-> AC), by using
  12. cpuidle_pause_and_lock, cpuidle_disable_device and cpuidle_enable_device,
  13. cpuidle_resume_and_unlock.
  14. Interfaces:
  15. extern int cpuidle_register(struct cpuidle_driver *drv,
  16. const struct cpumask *const coupled_cpus);
  17. extern int cpuidle_unregister(struct cpuidle_driver *drv);
  18. extern int cpuidle_register_driver(struct cpuidle_driver *drv);
  19. extern void cpuidle_unregister_driver(struct cpuidle_driver *drv);
  20. extern int cpuidle_register_device(struct cpuidle_device *dev);
  21. extern void cpuidle_unregister_device(struct cpuidle_device *dev);
  22. extern void cpuidle_pause_and_lock(void);
  23. extern void cpuidle_resume_and_unlock(void);
  24. extern int cpuidle_enable_device(struct cpuidle_device *dev);
  25. extern void cpuidle_disable_device(struct cpuidle_device *dev);