Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 137543
b: refs/heads/master
c: 05fd8e7
h: refs/heads/master
i:
  137541: a0e39d3
  137539: d89ad98
  137535: 491e6bd
v: v3
  • Loading branch information
Sascha Hauer committed Mar 27, 2009
1 parent edc40e1 commit f5ebdfc
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0412d6c9271811b84568fcea3237e2193e21866a
refs/heads/master: 05fd8e73e1357feaea9c48938d937eae76b4aef4
11 changes: 9 additions & 2 deletions trunk/arch/arm/common/clkdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,8 @@ static struct clk *clk_find(const char *dev_id, const char *con_id)
return clk;
}

struct clk *clk_get(struct device *dev, const char *con_id)
struct clk *clk_get_sys(const char *dev_id, const char *con_id)
{
const char *dev_id = dev ? dev_name(dev) : NULL;
struct clk *clk;

mutex_lock(&clocks_mutex);
Expand All @@ -75,6 +74,14 @@ struct clk *clk_get(struct device *dev, const char *con_id)

return clk ? clk : ERR_PTR(-ENOENT);
}
EXPORT_SYMBOL(clk_get_sys);

struct clk *clk_get(struct device *dev, const char *con_id)
{
const char *dev_id = dev ? dev_name(dev) : NULL;

return clk_get_sys(dev_id, con_id);
}
EXPORT_SYMBOL(clk_get);

void clk_put(struct clk *clk)
Expand Down
17 changes: 17 additions & 0 deletions trunk/include/linux/clk.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f5ebdfc

Please sign in to comment.