hc
2023-11-06 e3e12f52b214121840b44c91de5b3e5af5d3eb84
kernel/drivers/gpu/arm/mali400/mali/common/mali_osk.h
....@@ -950,23 +950,24 @@
950950
951951 /** @brief Initialize a timer
952952 *
953
- * Allocates resources for a new timer, and initializes them. This does not
954
- * start the timer.
955
- *
956
- * @return a pointer to the allocated timer object, or NULL on failure.
953
+ * Initializes a given timer instance.
954
+ * This does not start the timer.
955
+
956
+ * @param tim the timer to init.
957
+ * @param callback the callback that would be called when 'tim' times out.
957958 */
958
-_mali_osk_timer_t *_mali_osk_timer_init(_mali_osk_timer_callback_t callback);
959
+void _mali_osk_timer_init(_mali_osk_timer_t *tim, _mali_osk_timer_callback_t callback);
959960
960961 /** @brief Start a timer
961962 *
962963 * It is an error to start a timer without setting the callback via
963
- * _mali_osk_timer_setcallback().
964
+ * _mali_osk_timer_init().
964965 *
965966 * It is an error to use this to start an already started timer.
966967 *
967968 * The timer will expire in \a ticks_to_expire ticks, at which point, the
968969 * callback function will be invoked with the callback-specific data,
969
- * as registered by _mali_osk_timer_setcallback().
970
+ * as registered by _mali_osk_timer_init().
970971 *
971972 * @param tim the timer to start
972973 * @param ticks_to_expire the amount of time in ticks for the timer to run
....@@ -980,11 +981,11 @@
980981 * stopped. If \a ticks_to_expire 0 the timer fires immediately.
981982 *
982983 * It is an error to modify a timer without setting the callback via
983
- * _mali_osk_timer_setcallback().
984
+ * _mali_osk_timer_init().
984985 *
985986 * The timer will expire at \a ticks_to_expire from the time of the call, at
986987 * which point, the callback function will be invoked with the
987
- * callback-specific data, as set by _mali_osk_timer_setcallback().
988
+ * callback-specific data, as set by _mali_osk_timer_init().
988989 *
989990 * @param tim the timer to modify, and start if necessary
990991 * @param ticks_to_expire the \em absolute time in ticks at which this timer
....@@ -1033,34 +1034,6 @@
10331034 * @return MALI_TRUE if time is active, MALI_FALSE if it is not active
10341035 */
10351036 mali_bool _mali_osk_timer_pending(_mali_osk_timer_t *tim);
1036
-
1037
-/** @brief Set a timer's callback parameters.
1038
- *
1039
- * This must be called at least once before a timer is started/modified.
1040
- *
1041
- * After a timer has been stopped or expires, the callback remains set. This
1042
- * means that restarting the timer will call the same function with the same
1043
- * parameters on expiry.
1044
- *
1045
- * @param tim the timer to set callback on.
1046
- * @param callback Function to call when timer expires
1047
- * @param data Function-specific data to supply to the function on expiry.
1048
- */
1049
-void _mali_osk_timer_setcallback(_mali_osk_timer_t *tim, _mali_osk_timer_callback_t callback, void *data);
1050
-
1051
-/** @brief Terminate a timer, and deallocate resources.
1052
- *
1053
- * The timer must first be stopped by calling _mali_osk_timer_del().
1054
- *
1055
- * It is a programming error for _mali_osk_timer_term() to be called on:
1056
- * - timer that is currently running
1057
- * - a timer that is currently executing its callback.
1058
- *
1059
- * @param tim the timer to deallocate.
1060
- */
1061
-void _mali_osk_timer_term(_mali_osk_timer_t *tim);
1062
-/** @} */ /* end group _mali_osk_timer */
1063
-
10641037
10651038 /** @defgroup _mali_osk_time OSK Time functions
10661039 *