Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Copyright (C) 2013 Samsung Electronics Co., Ltd.
0004  * Sylwester Nawrocki <s.nawrocki@samsung.com>
0005  */
0006 
0007 struct clk_hw;
0008 struct device;
0009 struct of_phandle_args;
0010 
0011 #if defined(CONFIG_OF) && defined(CONFIG_COMMON_CLK)
0012 struct clk_hw *of_clk_get_hw(struct device_node *np,
0013                     int index, const char *con_id);
0014 #else /* !CONFIG_COMMON_CLK || !CONFIG_OF */
0015 static inline struct clk_hw *of_clk_get_hw(struct device_node *np,
0016                     int index, const char *con_id)
0017 {
0018     return ERR_PTR(-ENOENT);
0019 }
0020 #endif
0021 
0022 struct clk_hw *clk_find_hw(const char *dev_id, const char *con_id);
0023 
0024 #ifdef CONFIG_COMMON_CLK
0025 struct clk *clk_hw_create_clk(struct device *dev, struct clk_hw *hw,
0026                   const char *dev_id, const char *con_id);
0027 void __clk_put(struct clk *clk);
0028 #else
0029 /* All these casts to avoid ifdefs in clkdev... */
0030 static inline struct clk *
0031 clk_hw_create_clk(struct device *dev, struct clk_hw *hw, const char *dev_id,
0032           const char *con_id)
0033 {
0034     return (struct clk *)hw;
0035 }
0036 static inline void __clk_put(struct clk *clk) { }
0037 
0038 #endif