From 7fc7d241169d26ec79a86bfcab0e966c778defe7 Mon Sep 17 00:00:00 2001
From: Simon Glass <sjg@chromium.org>
Date: Fri, 22 May 2020 16:32:38 -0600
Subject: [PATCH] checkpatch.pl: Warn if the flattree API is used

We want people to use the livetree API, so request it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
 scripts/checkpatch.pl | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 1053d29ce9..2654f9e5f7 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2249,6 +2249,12 @@ sub u_boot_line {
 		WARN("NEW_UCLASS",
 		     "Possible new uclass - make sure to add a sandbox driver, plus a test in test/dm/<name>.c\n" . $herecurr);
 	}
+
+	# try to get people to use the livetree API
+	if ($line =~ /^\+.*fdtdec_/) {
+		WARN("LIVETREE",
+		     "Use the livetree API (dev_read_...)\n" . $herecurr);
+	}
 }
 
 sub process {
-- 
2.39.5