Commit Graph

8 Commits

Author SHA1 Message Date
Ulf Magnusson a3d3aa58b8 scripts/dts: Remove redundant empty constructors
It's not obligatory for Python classes to have an __init__().

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-15 11:09:49 -05:00
Ulf Magnusson f5b17d4138 scripts/dts: Call /foo/bar a "path" instead of an "address"
It's confusing that "address" is often used within the same function to
refer to both node paths and e.g. address cells.

Make things easier to understand by calling /foo/bar a path instead.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-22 12:44:16 -06:00
Ulf Magnusson 7df60372c2 scripts/dts: Rename convert_string_to_label() to str_to_label()
Less spammy and as easy to understand ("label" seems a bit confusing
though, but it's consistent with other code).

Also simplify some surrounding code, and clean up the implementation of
str_to_label() a bit.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-07 10:39:37 +01:00
Kumar Gala 35afcc9c12 scripts: extract_dts_includes: remove passing yaml param to functions
Various functions like add_prop_aliases, extract_single_prop,
extract_single, reg.extract, compatible.extract, default.extract, and
flash.extract don't use the yaml argument that is passed to them.
Remove passing the argument, this is the first step in making access to
the yaml node information go through an accessor function.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-12-07 09:08:04 -06:00
Kumar Gala f6a30ff070 dts/extract_dts_includes.py: refactor get_node_label_string
We can replace the method get_node_label_string in DTDirective with the
global function get_node_label.  This way we have a single place that
labels for defines are being generated.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-24 10:41:25 +01:00
Erwan Gouriou 8245b0c1a2 scripts/dts: extract_dts_includes: remove unused 'names' argument
Parameter 'names' is provided as argument of several property
extract functions. Thought it is actually used only once.
Remove when not needed.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-09-21 07:23:49 -07:00
Erwan Gouriou 8e7403504a scripts/dts: extract_dts_includes: makes 'defs' and 'structs' global
'defs' variable is used and passed as a parameter in the vast
majority of the functions of extract_dts_includes script.
Set this variable global
Do the same with 'struct' variable for upcoming change.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-08-06 09:44:21 -05:00
Bobby Noelte 08216f5ef4 scripts: extract_dts_includes.py: refactor for better maintenance
Refactor for better maintenance and to ease future enhancements.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2018-07-03 12:48:19 -05:00