Blame view

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