3 * (C) COPYRIGHT 2010-2011 ARM Limited. All rights reserved.
5 * This program is free software and is provided to you under the terms of the GNU General Public License version 2
6 * as published by the Free Software Foundation, and any use by you of this program is subject to the terms of such GNU licence.
8 * A copy of the licence is included with the program, and can also be obtained from Free Software
9 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 #error "Include mali_osk.h directly"
27 typedef enum osk_error
29 OSK_ERR_NONE, /**< Success */
30 OSK_ERR_FAIL, /**< Unclassified failure */
31 OSK_ERR_MAP, /**< Memory mapping operation failed */
32 OSK_ERR_ALLOC, /**< Memory allocation failed */
33 OSK_ERR_ACCESS /**< Permissions to access an object failed */
36 #define OSK_STATIC_INLINE static __inline
37 #define OSK_BITS_PER_LONG (8 * sizeof(unsigned long))
38 #define OSK_ULONG_MAX (~0UL)
43 * Flags specifying the kind of workqueue to create. Flags can be combined.
47 * By default a work queue guarantees non-reentrace on the same CPU.
48 * When the OSK_WORKQ_NON_REENTRANT flag is set, this guarantee is
49 * extended to all CPUs.
51 #define OSK_WORKQ_NON_REENTRANT (1 << 0)
53 * Work units submitted to a high priority queue start execution as soon
54 * as resources are available.
56 #define OSK_WORKQ_HIGH_PRIORITY (1 << 1)
58 * Ensures there is always a thread available to run tasks on this queue. This
59 * flag should be set if the work queue is involved in reclaiming memory when
62 #define OSK_WORKQ_RESCUER (1 << 2)
65 * Prototype for a function called when a OSK timer expires. See osk_timer_callback_set()
66 * that registers the callback function with a OSK timer.
68 typedef void (*osk_timer_callback)(void *);
70 typedef enum osk_power_state
72 OSK_POWER_STATE_OFF, /**< Device is off */
73 OSK_POWER_STATE_IDLE, /**< Device is idle */
74 OSK_POWER_STATE_ACTIVE /**< Device is active */
77 typedef enum osk_power_request_result
79 OSK_POWER_REQUEST_FINISHED, /**< The driver successfully completed the power state change for the device */
80 OSK_POWER_REQUEST_FAILED, /**< The driver for the device encountered an error changing the power state */
81 OSK_POWER_REQUEST_REFUSED /**< The OS didn't allow the power state change for the device */
82 } osk_power_request_result;
85 #include <osk/mali_osk_arch_types.h>
91 #endif /* _OSK_TYPES_H_ */