Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
devfreq.c File Reference
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/stat.h>
#include <linux/opp.h>
#include <linux/devfreq.h>
#include <linux/workqueue.h>
#include <linux/platform_device.h>
#include <linux/list.h>
#include <linux/printk.h>
#include <linux/hrtimer.h>
#include "governor.h"

Go to the source code of this file.

Functions

int update_devfreq (struct devfreq *devfreq)
 
struct devfreqdevfreq_add_device (struct device *dev, struct devfreq_dev_profile *profile, const struct devfreq_governor *governor, void *data)
 
int devfreq_remove_device (struct devfreq *devfreq)
 
 late_initcall (devfreq_start_polling)
 
 subsys_initcall (devfreq_init)
 
 module_exit (devfreq_exit)
 
struct oppdevfreq_recommended_opp (struct device *dev, unsigned long *freq, u32 flags)
 
int devfreq_register_opp_notifier (struct device *dev, struct devfreq *devfreq)
 
int devfreq_unregister_opp_notifier (struct device *dev, struct devfreq *devfreq)
 
 MODULE_AUTHOR ("MyungJoo Ham <[email protected]>")
 
 MODULE_DESCRIPTION ("devfreq class support")
 
 MODULE_LICENSE ("GPL")
 

Variables

struct classdevfreq_class
 

Function Documentation

struct devfreq* devfreq_add_device ( struct device dev,
struct devfreq_dev_profile profile,
const struct devfreq_governor governor,
void data 
)
read

devfreq_add_device() - Add devfreq feature to the device : the device to add devfreq feature. : device-specific profile to run devfreq. : the policy to choose frequency. : private data for the governor. The devfreq framework does not touch this value.

Definition at line 347 of file devfreq.c.

struct opp* devfreq_recommended_opp ( struct device dev,
unsigned long freq,
u32  flags 
)
read

devfreq_recommended_opp() - Helper function to get proper OPP for the freq value given to target callback. The devfreq user device. (parent of devfreq) The frequency given to target function Flags handed from devfreq framework.

Definition at line 649 of file devfreq.c.

int devfreq_register_opp_notifier ( struct device dev,
struct devfreq devfreq 
)

devfreq_register_opp_notifier() - Helper function to get devfreq notified for any changes in the OPP availability changes The devfreq user device. (parent of devfreq) The devfreq object.

Definition at line 680 of file devfreq.c.

int devfreq_remove_device ( struct devfreq devfreq)

devfreq_remove_device() - Remove devfreq feature from a device. the devfreq instance to be removed

Definition at line 436 of file devfreq.c.

int devfreq_unregister_opp_notifier ( struct device dev,
struct devfreq devfreq 
)

devfreq_unregister_opp_notifier() - Helper function to stop getting devfreq notified for any changes in the OPP availability changes anymore. The devfreq user device. (parent of devfreq) The devfreq object.

At exit() callback of devfreq_dev_profile, this must be included if devfreq_recommended_opp is used.

Definition at line 699 of file devfreq.c.

late_initcall ( devfreq_start_polling  )
MODULE_AUTHOR ( "MyungJoo Ham <[email protected]>"  )
MODULE_DESCRIPTION ( "devfreq class support )
module_exit ( devfreq_exit  )
MODULE_LICENSE ( "GPL"  )
subsys_initcall ( devfreq_init  )
int update_devfreq ( struct devfreq devfreq)

update_devfreq() - Reevaluate the device and configure frequency. : the devfreq instance.

Note: Lock devfreq->lock before calling update_devfreq This function is exported for governors.

Definition at line 82 of file devfreq.c.

Variable Documentation

struct class* devfreq_class

Definition at line 30 of file devfreq.c.