1# SPDX-License-Identifier: BSD-3-Clause 2# 3# Amends base properties specifications: 4# - extends property specifications by adding definitions, 5# e.g. setting a "default:" value 6# - overwrites existing definitions of a property, 7# e.g. change its "description:" 8# - specify new properties 9# 10# The same kind of amendments are applied to the same properties 11# at each level (binding, child-binding, grandchild-binding). 12# 13# | Definition | Extended for | Overwritten for | 14# |----------------|--------------|-----------------| 15# | description: | prop-2 | prop-1 | 16# | required: | | prop-enum | 17# | enum: | prop-2 | | 18# | const: | prop-1 | | 19# | default: | prop-2 | | 20# 21# Non authorized amendments, e.g. changing a "const:" value 22# or downgrading a "required: true" definition are tested separately. 23 24description: Amended description. 25 26include: base.yaml 27 28properties: 29 prop-1: 30 # The including binding is permitted to overwrite a property description. 31 description: Overwritten description. 32 # The including binding is permitted to set a "const:" value. 33 const: 0xf0 34 35 prop-2: 36 # The including binding is permitted to add a property description. 37 description: New description. 38 # The including binding is permitted to limit property values 39 # to an enumeration. 40 enum: 41 - EXT_FOO 42 - EXT_BAR 43 # The including binding is permitted to set a default value. 44 default: EXT_FOO 45 46 # The including binding is permitted to promote a property 47 # to requirement. 48 prop-enum: 49 required: true 50 51 # The including binding is permitted to define a new property. 52 prop-new: 53 type: int 54 55# Same amendments at the child-binding level. 56child-binding: 57 properties: 58 child-prop-1: 59 description: Overwritten description (child). 60 const: 0xf1 61 62 child-prop-2: 63 description: New description (child). 64 enum: 65 - CHILD_EXT_FOO 66 - CHILD_EXT_BAR 67 default: CHILD_EXT_FOO 68 69 child-prop-enum: 70 required: true 71 72 child-prop-new: 73 type: int 74 75 # Same amendments at the grandchild-binding level. 76 child-binding: 77 # Plus amended grandchild-binding description. 78 description: Amended grandchild-binding description. 79 80 properties: 81 grandchild-prop-1: 82 description: Overwritten description (grandchild). 83 const: 0xf2 84 85 grandchild-prop-2: 86 description: New description (grandchild). 87 enum: 88 - GRANDCHILD_EXT_FOO 89 - GRANDCHILD_EXT_BAR 90 default: GRANDCHILD_EXT_FOO 91 92 grandchild-prop-enum: 93 required: true 94 95 grandchild-prop-new: 96 type: int 97