aboutsummaryrefslogtreecommitdiff
path: root/drivers/clk/adi/clk-shared.c
blob: dcadcafa9d236882af8c7b397eeeeb44461a23cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * (C) Copyright 2022 - Analog Devices, Inc.
 *
 * Written and/or maintained by Timesys Corporation
 *
 * Author: Greg Malysa <greg.malysa@timesys.com>
 */

#include "clk.h"

static ulong adi_get_rate(struct clk *clk)
{
	struct clk *c;
	int ret;

	ret = clk_get_by_id(clk->id, &c);
	if (ret)
		return ret;

	return clk_get_rate(c);
}

static ulong adi_set_rate(struct clk *clk, ulong rate)
{
	//Not yet implemented
	return 0;
}

static int adi_enable(struct clk *clk)
{
	//Not yet implemented
	return 0;
}

static int adi_disable(struct clk *clk)
{
	//Not yet implemented
	return 0;
}

const struct clk_ops adi_clk_ops = {
	.set_rate = adi_set_rate,
	.get_rate = adi_get_rate,
	.enable = adi_enable,
	.disable = adi_disable,
};