iosf(4) implements functionality that was stubbed out in drm
authordlg <dlg@openbsd.org>
Sun, 23 Apr 2023 00:49:04 +0000 (00:49 +0000)
committerdlg <dlg@openbsd.org>
Sun, 23 Apr 2023 00:49:04 +0000 (00:49 +0000)
sys/dev/pci/drm/include/asm/iosf_mbi.h

index 8e8dc5c..081e790 100644 (file)
@@ -3,10 +3,11 @@
 #ifndef _ASM_IOSF_MBI_H
 #define _ASM_IOSF_MBI_H
 
-struct notifier_block;
+#include "iosf.h"
 
-#define MBI_PMIC_BUS_ACCESS_BEGIN      1
-#define MBI_PMIC_BUS_ACCESS_END                2
+#if NIOSF > 0
+#include <dev/ic/iosfvar.h>
+#else
 
 static inline void
 iosf_mbi_assert_punit_acquired(void)
@@ -23,6 +24,13 @@ iosf_mbi_punit_release(void)
 {
 }
 
+#endif /* NIOSF */
+
+struct notifier_block;
+
+#define MBI_PMIC_BUS_ACCESS_BEGIN      1
+#define MBI_PMIC_BUS_ACCESS_END                2
+
 static inline int
 iosf_mbi_register_pmic_bus_access_notifier(struct notifier_block *nb)
 {