summaryrefslogtreecommitdiff
path: root/drivers/staging/board/board.h
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-08-05 17:04:01 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-08-05 17:04:01 -0300
commit57f0f512b273f60d52568b8c6b77e17f5636edc0 (patch)
tree5e910f0e82173f4ef4f51111366a3f1299037a7b /drivers/staging/board/board.h
Initial import
Diffstat (limited to 'drivers/staging/board/board.h')
-rw-r--r--drivers/staging/board/board.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/staging/board/board.h b/drivers/staging/board/board.h
new file mode 100644
index 000000000..2390ed6c3
--- /dev/null
+++ b/drivers/staging/board/board.h
@@ -0,0 +1,20 @@
+#ifndef __BOARD_H__
+#define __BOARD_H__
+#include <linux/init.h>
+#include <linux/of.h>
+
+bool board_staging_dt_node_available(const struct resource *resource,
+ unsigned int num_resources);
+
+#define board_staging(str, fn) \
+static int __init runtime_board_check(void) \
+{ \
+ if (of_machine_is_compatible(str)) \
+ fn(); \
+ \
+ return 0; \
+} \
+ \
+late_initcall(runtime_board_check)
+
+#endif /* __BOARD_H__ */