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);
19 * Get the timer input clock frequency
21 * @dev: The Timer device
22 * @return: the timer input clock frequency
24 unsigned long timer_get_rate(struct udevice *dev);
27 * struct timer_ops - Driver model Timer operations
29 * The uclass interface is implemented by all Timer devices which use
34 * Get the current timer count
36 * @dev: The Timer device
37 * @count: pointer that returns the current timer count
38 * @return: 0 if OK, -ve on error
40 int (*get_count)(struct udevice *dev, unsigned long *count);
44 * struct timer_dev_priv - information about a device used by the uclass
46 * @clock_rate: the timer input clock frequency
48 struct timer_dev_priv {
49 unsigned long clock_rate;
52 #endif /* _TIMER_H_ */