devicetree: edtlib: prefixes which are not vendors are NOT vendors
In Linux, checkpatch.pl relies on the vendor-prefixes.yaml file to validate manufacturers in compatible strings. In addition to the vendors defined in vendor-prefixes.txt, the YAML file includes expressions for "prefixes which are not vendors": these expressions do NOT define special manufacturers that may appear in compatible strings, and are never involved as such in DTS files. We can rather see them as bulk-definitions of JSON/YAML properties suitable for the dt-schema tools. OTHO, in Zephyr, checkpatch.pl relies on the vendor-prefixes.txt file, which does not include these additional prefixes, but edtlib.EDT adds them as hard-coded special values. This is confusing, if not incorrect: - the fact that edtlib.EDT (and thus its client code in the zephyr/scripts directory) actually allows these vendors in compatible strings is buried in the source code - checkpatch.pl (with vendor-prefixes.txt) in Zephyr behaves neither like checkpatch.pl (with vendor-prefixes.yaml) in Linux, nor like edtlib.EDT (with _VENDOR_PREFIX_ALLOWED) - Zephyr should not treat these "prefixes which are not vendors" as valid manufacturers in compatible strings to begin with Signed-off-by: Christophe Dufaza <chris@openmarl.org>
This commit is contained in:
parent
9555cf2f72
commit
ad48c51651
1 changed files with 1 additions and 13 deletions
|
@ -2247,8 +2247,7 @@ class EDT:
|
|||
|
||||
# As an exception, the root node can have whatever
|
||||
# compatibles it wants. Other nodes get checked.
|
||||
elif node.path != '/' and \
|
||||
vendor not in _VENDOR_PREFIX_ALLOWED:
|
||||
elif node.path != '/':
|
||||
if self._werror:
|
||||
handler_fn: Any = _err
|
||||
else:
|
||||
|
@ -3214,14 +3213,3 @@ _DEFAULT_PROP_SPECS: Dict[str, PropertySpec] = {
|
|||
name: PropertySpec(name, _DEFAULT_PROP_BINDING)
|
||||
for name in _DEFAULT_PROP_TYPES
|
||||
}
|
||||
|
||||
# A set of vendor prefixes which are grandfathered in by Linux,
|
||||
# and therefore by us as well.
|
||||
_VENDOR_PREFIX_ALLOWED: Set[str] = set([
|
||||
"at25", "bm", "devbus", "dmacap", "dsa",
|
||||
"exynos", "fsia", "fsib", "gpio-fan", "gpio-key", "gpio", "gpmc",
|
||||
"hdmi", "i2c-gpio", "keypad", "m25p", "max8952", "max8997",
|
||||
"max8998", "mpmc", "pinctrl-single", "#pinctrl-single", "PowerPC",
|
||||
"pl022", "pxa-mmc", "rcar_sound", "rotary-encoder", "s5m8767",
|
||||
"sdhci", "simple-audio-card", "st-plgpio", "st-spics", "ts",
|
||||
])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue