blob: 4cdf30b0008c54cae9b807ea93ae14d6e334a791 [file] [log] [blame]
Stephen Boydebafb632018-12-11 09:43:03 -08001/* SPDX-License-Identifier: GPL-2.0 */
Sylwester Nawrockid6782c22013-08-23 17:03:43 +02002/*
Sylwester Nawrockid6782c22013-08-23 17:03:43 +02003 * Copyright (C) 2013 Samsung Electronics Co., Ltd.
4 * Sylwester Nawrocki <s.nawrocki@samsung.com>
Sylwester Nawrockid6782c22013-08-23 17:03:43 +02005 */
6
Tomeu Vizoso035a61c2015-01-23 12:03:30 +01007struct clk_hw;
8
Sylwester Nawrockid6782c22013-08-23 17:03:43 +02009#if defined(CONFIG_OF) && defined(CONFIG_COMMON_CLK)
Stephen Boyd73e0e492015-02-06 11:42:43 -080010struct clk *__of_clk_get_from_provider(struct of_phandle_args *clkspec,
11 const char *dev_id, const char *con_id);
Sylwester Nawrockid6782c22013-08-23 17:03:43 +020012#endif
Tomeu Vizoso035a61c2015-01-23 12:03:30 +010013
Stephen Boyd73e0e492015-02-06 11:42:43 -080014#ifdef CONFIG_COMMON_CLK
Stephen Boyd1df40462018-12-11 08:32:04 -080015struct clk *clk_hw_create_clk(struct clk_hw *hw,
16 const char *dev_id, const char *con_id);
Stephen Boydbfc0cbf2018-01-02 16:54:16 -080017void __clk_put(struct clk *clk);
Stephen Boyd73e0e492015-02-06 11:42:43 -080018#else
19/* All these casts to avoid ifdefs in clkdev... */
20static inline struct clk *
Stephen Boyd1df40462018-12-11 08:32:04 -080021clk_hw_create_clk(struct clk_hw *hw, const char *dev_id, const char *con_id)
Stephen Boyd73e0e492015-02-06 11:42:43 -080022{
23 return (struct clk *)hw;
24}
Stephen Boyd73e0e492015-02-06 11:42:43 -080025static struct clk_hw *__clk_get_hw(struct clk *clk)
26{
27 return (struct clk_hw *)clk;
28}
Stephen Boydbfc0cbf2018-01-02 16:54:16 -080029static inline void __clk_put(struct clk *clk) { }
Stephen Boyd73e0e492015-02-06 11:42:43 -080030
31#endif