kconfig: Mark dt_{int,hex,str}_val as deprecated
As we work on removing the .conf file that is generated by the dt
scripts, mark dt_{int,hex,str}_val functions as deprecated.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
diff --git a/scripts/kconfig/kconfigfunctions.py b/scripts/kconfig/kconfigfunctions.py
index 938dd32..399d4f5 100644
--- a/scripts/kconfig/kconfigfunctions.py
+++ b/scripts/kconfig/kconfigfunctions.py
@@ -38,6 +38,11 @@
define, val = line.split('=', 1)
dt_defines[define] = val.strip()
+
+def _warn(kconf, msg):
+ print("{}:{}: WARNING: {}".format(kconf.filename, kconf.linenr, msg))
+
+
def _dt_units_to_scale(unit):
if not unit:
return 0
@@ -62,6 +67,8 @@
if doc_mode or name not in dt_defines:
return "0"
+ _warn(kconf, "dt_int_val is deprecated.")
+
d = dt_defines[name]
if d.startswith(('0x', '0X')):
d = int(d, 16)
@@ -85,6 +92,8 @@
if doc_mode or name not in dt_defines:
return "0x0"
+ _warn(kconf, "dt_hex_val is deprecated.")
+
d = dt_defines[name]
if d.startswith(('0x', '0X')):
d = int(d, 16)
@@ -104,6 +113,8 @@
if doc_mode or name not in dt_defines:
return ""
+ _warn(kconf, "dt_str_val is deprecated.")
+
return dt_defines[name].strip('"')