blob: a18f41ffca632e9b8abc899898fa4f34605e8a55 [file] [log] [blame]
Gabriel Fernandez8aac3072020-10-13 09:36:25 +02001/*
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
12struct 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
20int clk_enable(unsigned long id);
21void clk_disable(unsigned long id);
22unsigned long clk_get_rate(unsigned long id);
23bool clk_is_enabled(unsigned long id);
24int clk_get_parent(unsigned long id);
25
26void clk_register(const struct clk_ops *ops);
27
28#endif /* CLK_H */