xref: /linux/include/linux/soc/mediatek/mtk-mutex.h (revision 24bce201d79807b668bf9d9e0aca801c5c0d5f78)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright (c) 2015 MediaTek Inc.
4  */
5 
6 #ifndef MTK_MUTEX_H
7 #define MTK_MUTEX_H
8 
9 struct regmap;
10 struct device;
11 struct mtk_mutex;
12 
13 struct mtk_mutex *mtk_mutex_get(struct device *dev);
14 int mtk_mutex_prepare(struct mtk_mutex *mutex);
15 void mtk_mutex_add_comp(struct mtk_mutex *mutex,
16 			enum mtk_ddp_comp_id id);
17 void mtk_mutex_enable(struct mtk_mutex *mutex);
18 void mtk_mutex_disable(struct mtk_mutex *mutex);
19 void mtk_mutex_remove_comp(struct mtk_mutex *mutex,
20 			   enum mtk_ddp_comp_id id);
21 void mtk_mutex_unprepare(struct mtk_mutex *mutex);
22 void mtk_mutex_put(struct mtk_mutex *mutex);
23 void mtk_mutex_acquire(struct mtk_mutex *mutex);
24 void mtk_mutex_release(struct mtk_mutex *mutex);
25 
26 #endif /* MTK_MUTEX_H */
27