2 * Copyright (C) 2015 Thomas Chou <thomas@wytron.com.tw>
4 * SPDX-License-Identifier: GPL-2.0+
11 * Get the current timer count
13 * @dev: The timer device
14 * @count: pointer that returns the current timer count
15 * @return: 0 if OK, -ve on error
17 int timer_get_count(struct udevice *dev, unsigned long *count);
20 * Get the timer input clock frequency
22 * @dev: The timer device
23 * @return: the timer input clock frequency
25 unsigned long timer_get_rate(struct udevice *dev);
28 * struct timer_ops - Driver model timer operations
30 * The uclass interface is implemented by all timer devices which use
35 * Get the current timer count
37 * @dev: The timer device
38 * @count: pointer that returns the current timer count
39 * @return: 0 if OK, -ve on error
41 int (*get_count)(struct udevice *dev, unsigned long *count);
45 * struct timer_dev_priv - information about a device used by the uclass
47 * @clock_rate: the timer input clock frequency
49 struct timer_dev_priv {
50 unsigned long clock_rate;
53 #endif /* _TIMER_H_ */