Redirect checkpatch.sh to ../optee_os

use the checkpatch-helper scripts from optee_os repo

Signed-off-by: Markus S. Wamser <markus.wamser@mixed-mode.de>
Acked-by: Jerome Forissier <jerome@forissier.org>
diff --git a/Makefile b/Makefile
index 7a0018a..c186d91 100644
--- a/Makefile
+++ b/Makefile
@@ -210,6 +210,15 @@
 	$(q) echo "Please define CFG_GP_PACKAGE_PATH" && false
 endif
 
+.PHONY: checkpatch checkpatch-staging checkpatch-working
+checkpatch: checkpatch-staging checkpatch-working
+
+checkpatch-working:
+	@./scripts/checkpatch.sh
+
+checkpatch-staging:
+	@./scripts/checkpatch.sh --cached
+
 install:
 	$(echo) '  INSTALL ${DESTDIR}/lib/optee_armtz'
 	$(q)mkdir -p ${DESTDIR}/lib/optee_armtz
diff --git a/scripts/checkpatch.sh b/scripts/checkpatch.sh
new file mode 100644
index 0000000..505706d
--- /dev/null
+++ b/scripts/checkpatch.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+if [ -z "$OPTEE_OS_PATH" ]; then
+   OPTEE_OS_PATH="../optee_os";
+fi
+
+source $OPTEE_OS_PATH/scripts/checkpatch.sh "$@"
diff --git a/typedefs.checkpatch b/typedefs.checkpatch
new file mode 100644
index 0000000..ea65adc
--- /dev/null
+++ b/typedefs.checkpatch
@@ -0,0 +1,2 @@
+TEE_Result
+TEE_UUID