1 /* 2 * Copyright (c) 2021, STMicroelectronics - All Rights Reserved 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef CLK_H 8 #define CLK_H 9 10 #include <stdbool.h> 11 12 struct clk_ops { 13 int (*enable)(unsigned long id); 14 void (*disable)(unsigned long id); 15 unsigned long (*get_rate)(unsigned long id); 16 int (*get_parent)(unsigned long id); 17 bool (*is_enabled)(unsigned long id); 18 }; 19 20 int clk_enable(unsigned long id); 21 void clk_disable(unsigned long id); 22 unsigned long clk_get_rate(unsigned long id); 23 bool clk_is_enabled(unsigned long id); 24 int clk_get_parent(unsigned long id); 25 26 void clk_register(const struct clk_ops *ops); 27 28 #endif /* CLK_H */ 29