Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
clkdev.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/device.h>
#include <linux/list.h>
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/string.h>
#include <linux/mutex.h>
#include <linux/clk.h>
#include <linux/clkdev.h>
#include <linux/of.h>

Go to the source code of this file.

Data Structures

struct  clk_lookup_alloc
 

Macros

#define MAX_DEV_ID   20
 
#define MAX_CON_ID   16
 

Functions

struct clkclk_get_sys (const char *dev_id, const char *con_id)
 
 EXPORT_SYMBOL (clk_get_sys)
 
struct clkclk_get (struct device *dev, const char *con_id)
 
 EXPORT_SYMBOL (clk_get)
 
void clk_put (struct clk *clk)
 
 EXPORT_SYMBOL (clk_put)
 
void clkdev_add (struct clk_lookup *cl)
 
 EXPORT_SYMBOL (clkdev_add)
 
void __init clkdev_add_table (struct clk_lookup *cl, size_t num)
 
struct clk_lookup *__init_refok clkdev_alloc (struct clk *clk, const char *con_id, const char *dev_fmt,...)
 
 EXPORT_SYMBOL (clkdev_alloc)
 
int clk_add_alias (const char *alias, const char *alias_dev_name, char *id, struct device *dev)
 
 EXPORT_SYMBOL (clk_add_alias)
 
void clkdev_drop (struct clk_lookup *cl)
 
 EXPORT_SYMBOL (clkdev_drop)
 
int clk_register_clkdev (struct clk *clk, const char *con_id, const char *dev_fmt,...)
 
int clk_register_clkdevs (struct clk *clk, struct clk_lookup *cl, size_t num)
 
 EXPORT_SYMBOL (clk_register_clkdevs)
 

Macro Definition Documentation

#define MAX_CON_ID   16

Definition at line 193 of file clkdev.c.

#define MAX_DEV_ID   20

Definition at line 192 of file clkdev.c.

Function Documentation

int clk_add_alias ( const char alias,
const char alias_dev_name,
char id,
struct device dev 
)

clk_add_alias - add a new clock alias : name for clock alias : device name : platform specific clock name : device

Allows using generic clock names for drivers by adding a new alias. Assumes clkdev, see clkdev.h for more info.

Definition at line 239 of file clkdev.c.

struct clk* clk_get ( struct device dev,
const char con_id 
)
read

Definition at line 153 of file clkdev.c.

struct clk* clk_get_sys ( const char dev_id,
const char con_id 
)
read

Definition at line 139 of file clkdev.c.

void clk_put ( struct clk clk)

Definition at line 168 of file clkdev.c.

int clk_register_clkdev ( struct clk clk,
const char con_id,
const char dev_fmt,
  ... 
)

clk_register_clkdev - register one clock lookup for a struct clk : struct clk to associate with all clk_lookups : connection ID string on device : format string describing device name

con_id or dev_id may be NULL as a wildcard, just as in the rest of clkdev.

To make things easier for mass registration, we detect error clks from a previous clk_register() call, and return the error code for those. This is to permit this function to be called immediately after clk_register().

Definition at line 283 of file clkdev.c.

int clk_register_clkdevs ( struct clk clk,
struct clk_lookup cl,
size_t  num 
)

clk_register_clkdevs - register a set of clk_lookup for a struct clk : struct clk to associate with all clk_lookups : array of clk_lookup structures with con_id and dev_id pre-initialized : number of clk_lookup structures to register

To make things easier for mass registration, we detect error clks from a previous clk_register() call, and return the error code for those. This is to permit this function to be called immediately after clk_register().

Definition at line 315 of file clkdev.c.

void clkdev_add ( struct clk_lookup cl)

Definition at line 174 of file clkdev.c.

void __init clkdev_add_table ( struct clk_lookup cl,
size_t  num 
)

Definition at line 182 of file clkdev.c.

struct clk_lookup* __init_refok clkdev_alloc ( struct clk clk,
const char con_id,
const char dev_fmt,
  ... 
)
read

Definition at line 226 of file clkdev.c.

void clkdev_drop ( struct clk_lookup cl)

Definition at line 260 of file clkdev.c.

EXPORT_SYMBOL ( clk_get_sys  )
EXPORT_SYMBOL ( clk_get  )
EXPORT_SYMBOL ( clk_put  )
EXPORT_SYMBOL ( clkdev_add  )
EXPORT_SYMBOL ( clkdev_alloc  )
EXPORT_SYMBOL ( clk_add_alias  )
EXPORT_SYMBOL ( clkdev_drop  )
EXPORT_SYMBOL ( clk_register_clkdevs  )