Skip to content
Permalink
Browse files

scripts/dts: Treat string-list always as a list

If the type of property is a 'string-list' we should generate defines as
if its a list even if theres only a single element in the list.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
  • Loading branch information...
galak committed Jun 21, 2019
1 parent 2910b5e commit 344737d75949cde6128553ff6bd456ede60523db
Showing with 3 additions and 0 deletions.
  1. +3 −0 scripts/dts/extract/default.py
@@ -46,6 +46,9 @@ def extract(self, node_path, prop, prop_type, def_label):
else:
prop_values = reduced[node_path]['props'][prop]

if prop_type == "string-array":
if type(prop_values) is not list: prop_values = [ prop_values, ]

if isinstance(prop_values, list):
for i, prop_value in enumerate(prop_values):
prop_name = str_to_label(prop)

0 comments on commit 344737d

Please sign in to comment.
You can’t perform that action at this time.