diff options
author | Sean Anderson <seanga2@gmail.com> | 2020-10-07 14:37:44 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-10-22 09:54:53 -0400 |
commit | 8af7bb914f8b2238ea37faa8e59277ba4cb26d37 (patch) | |
tree | 8bb80517f8d547e0b845354e99375938f0f3fcbc /include/timer.h | |
parent | aff60aba6c44770fab8f2694ae81bafde6d22998 (diff) | |
download | u-boot-8af7bb914f8b2238ea37faa8e59277ba4cb26d37.tar.gz |
timer: Return count from timer_ops.get_count
No timer drivers return an error from get_count. Instead of possibly
returning an error, just return the count directly.
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/timer.h')
-rw-r--r-- | include/timer.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/timer.h b/include/timer.h index aa9d870619..a044cb034e 100644 --- a/include/timer.h +++ b/include/timer.h @@ -67,11 +67,14 @@ struct timer_ops { * * @dev: The timer device * - * @count: pointer that returns the current 64-bit timer count + * This function may be called at any time after the driver is probed. + * All necessary initialization must be completed by the time probe() + * returns. The count returned by this functions should be monotonic. + * This function must succeed. * - * Return: 0 if OK, -ve on error + * Return: The current 64-bit timer count */ - int (*get_count)(struct udevice *dev, u64 *count); + u64 (*get_count)(struct udevice *dev); }; /** |