diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2009-03-07 12:55:49 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2009-03-27 14:51:13 +0100 |
commit | 05fd8e73e1357feaea9c48938d937eae76b4aef4 (patch) | |
tree | 77aa0cfcfbd892423dcba295610116ca053029e2 /include | |
parent | 0412d6c9271811b84568fcea3237e2193e21866a (diff) | |
download | kernel_samsung_espresso10-05fd8e73e1357feaea9c48938d937eae76b4aef4.zip kernel_samsung_espresso10-05fd8e73e1357feaea9c48938d937eae76b4aef4.tar.gz kernel_samsung_espresso10-05fd8e73e1357feaea9c48938d937eae76b4aef4.tar.bz2 |
clkdev: add possibility to get a clock based on the device name
This adds clk_get_sys to get a clock without the associated struct
device.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/clk.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/clk.h b/include/linux/clk.h index 7787773..1db9bbf 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h @@ -125,4 +125,21 @@ int clk_set_parent(struct clk *clk, struct clk *parent); */ struct clk *clk_get_parent(struct clk *clk); +/** + * clk_get_sys - get a clock based upon the device name + * @dev_id: device name + * @con_id: connection ID + * + * Returns a struct clk corresponding to the clock producer, or + * valid IS_ERR() condition containing errno. The implementation + * uses @dev_id and @con_id to determine the clock consumer, and + * thereby the clock producer. In contrast to clk_get() this function + * takes the device name instead of the device itself for identification. + * + * Drivers must assume that the clock source is not enabled. + * + * clk_get_sys should not be called from within interrupt context. + */ +struct clk *clk_get_sys(const char *dev_id, const char *con_id); + #endif |