MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / ofw_get_clk

Function ofw_get_clk

components/drivers/clk/clk.c:1256–1267  ·  view source on GitHub ↗

* @brief Get clock from ofw with acquiring a spin lock * * @param np point to ofw node * @param index index of clock in ofw * @param name connection identifier for the clock * * @return struct rt_clk* point to the newly created clock object, or an error pointer */

Source from the content-addressed store, hash-verified

1254 * @return struct rt_clk* point to the newly created clock object, or an error pointer
1255 */
1256static struct rt_clk *ofw_get_clk(struct rt_ofw_node *np, int index, const char *name)
1257{
1258 struct rt_clk *clk;
1259
1260 rt_hw_spin_lock(&_clk_lock.lock);
1261
1262 clk = ofw_get_clk_no_lock(np, index, name, RT_TRUE);
1263
1264 rt_hw_spin_unlock(&_clk_lock.lock);
1265
1266 return clk;
1267}
1268
1269/**
1270 * @brief Get clock array from ofw

Callers 2

rt_ofw_get_clkFunction · 0.85
rt_ofw_get_clk_by_nameFunction · 0.85

Calls 3

ofw_get_clk_no_lockFunction · 0.85
rt_hw_spin_lockFunction · 0.50
rt_hw_spin_unlockFunction · 0.50

Tested by

no test coverage detected