1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2021 Intel Corporation
4  */
5 
6 #ifndef __I915_IOSF_MBI_H__
7 #define __I915_IOSF_MBI_H__
8 
9 #if IS_ENABLED(CONFIG_IOSF_MBI)
10 #include <asm/iosf_mbi.h>
11 #else
12 
13 /* Stubs to compile for all non-x86 archs */
14 #define MBI_PMIC_BUS_ACCESS_BEGIN       1
15 #define MBI_PMIC_BUS_ACCESS_END         2
16 
17 struct notifier_block;
18 
19 static inline void iosf_mbi_punit_acquire(void) {}
20 static inline void iosf_mbi_punit_release(void) {}
21 static inline void iosf_mbi_assert_punit_acquired(void) {}
22 
23 static inline
24 int iosf_mbi_register_pmic_bus_access_notifier(struct notifier_block *nb)
25 {
26 	return 0;
27 }
28 
29 static inline int
30 iosf_mbi_unregister_pmic_bus_access_notifier_unlocked(struct notifier_block *nb)
31 {
32 	return 0;
33 }
34 
35 static inline
36 int iosf_mbi_unregister_pmic_bus_access_notifier(struct notifier_block *nb)
37 {
38 	return 0;
39 }
40 #endif
41 
42 #endif /* __I915_IOSF_MBI_H__ */
43