smbios: dts: Add "asset-tag" property to "enclosure" subnode
PATCH 1/1 smbios: dts: Add "asset-tag" property to "enclosure" subnode
Currently, device trees can only specify an asset tag for the "baseboard" type, not for the "chassis" (system enclosure) type, which usually carries the more user-visible asset tag.
Add support for the chassis asset-tag, and update the documentation.
Signed-off-by Christian Kohlschütter <[email protected]>
--- doc/device-tree-bindings/sysinfo/smbios.txt | 4 ++++ lib/smbios.c | 1 + 2 files changed, 5 insertions(+)
doc/device-tree-bindings/sysinfo/smbios.txt +4 -0
@@ -44,6 +44,9 @@ Within each subnode the following tables are recognised: "chassis" subnode optional properties: - manufacturer: Product manufacturer for chassis + - asset-tag: Asset tag for the system enclosure, sometimes used in + organisations to track devices + Example:
@@ -72,6 +75,7 @@ sysinfo { /* Type 3 table */ chassis { manufacturer = "Google"; + asset-tag = "XYZ789"; }; }; };
lib/smbios.c +1 -0
@@ -347,6 +347,7 @@ static int smbios_write_type3(ulong *current, int handle,if (!t->manufacturer) t->manufacturer =smbios_add_string (ctx,"Unknown" ); t->chassis_type =SMBIOS_ENCLOSURE_DESKTOP ; + t->asset_tag_number =smbios_add_prop (ctx,"asset-tag" ); t->bootup_state =SMBIOS_STATE_SAFE ; t->power_supply_state =SMBIOS_STATE_SAFE ; t->thermal_state =SMBIOS_STATE_SAFE ;
Signature · 1 line
2.36.2
Quoted 5 lines · Christian Kohlschütter
Currently, device trees can only specify an asset tag for the "baseboard" type, not for the "chassis" (system enclosure) type, which usually carries the more user-visible asset tag.
Quoted 7 lines
Add support for the chassis asset-tag, and update the documentation.
Signed-off-by Christian Kohlschütter <[email protected]>--- doc/device-tree-bindings/sysinfo/smbios.txt | 4 ++++ lib/smbios.c | 1 + 2 files changed, 5 insertions(+)
Reviewed-by Simon Glass <[email protected]>
Quoted 38 lines
doc/device-tree-bindings/sysinfo/smbios.txt +4
-0@@ -44,6 +44,9 @@ Within each subnode the following tables are recognised: "chassis" subnode optional properties: - manufacturer: Product manufacturer for chassis + - asset-tag: Asset tag for the system enclosure, sometimes used in + organisations to track devices + Example:@@ -72,6 +75,7 @@ sysinfo { /* Type 3 table */ chassis { manufacturer = "Google"; + asset-tag = "XYZ789"; }; }; };lib/smbios.c +1
-1@@ -347,6 +347,7 @@ static int smbios_write_type3(ulong *current, int handle,if (!t->manufacturer) t->manufacturer =smbios_add_string (ctx,"Unknown" ); t->chassis_type =SMBIOS_ENCLOSURE_DESKTOP ; + t->asset_tag_number =smbios_add_prop (ctx,"asset-tag" ); t->bootup_state =SMBIOS_STATE_SAFE ; t->power_supply_state =SMBIOS_STATE_SAFE ; t->thermal_state =SMBIOS_STATE_SAFE ; --2.36.2