Lines Matching +full:label +full:- +full:revision
1 // SPDX-License-Identifier: GPL-2.0
3 * Export the firmware instance and label associated with a PCI device to
10 * PCI Firmware Specification Revision 3.1 section 4.6.7 (DSM for Naming a
33 #include <linux/pci-acpi.h>
63 int domain_nr = pci_domain_nr(pdev->bus); in find_smbios_instance_string()
64 int bus = pdev->bus->number; in find_smbios_instance_string()
65 int devfn = pdev->devfn; in find_smbios_instance_string()
70 donboard = dmi->device_data; in find_smbios_instance_string()
71 if (donboard && donboard->segment == domain_nr && in find_smbios_instance_string()
72 donboard->bus == bus && in find_smbios_instance_string()
73 donboard->devfn == devfn) { in find_smbios_instance_string()
77 donboard->instance); in find_smbios_instance_string()
80 dmi->name); in find_smbios_instance_string()
82 return strlen(dmi->name); in find_smbios_instance_string()
96 static struct device_attribute dev_attr_smbios_label = __ATTR(label, 0444,
127 return a->mode; in smbios_attr_is_visible()
146 len = utf16s_to_utf8s((const wchar_t *)obj->buffer.pointer, in dsm_label_utf16s_to_utf8s()
147 obj->buffer.length, in dsm_label_utf16s_to_utf8s()
149 buf, PAGE_SIZE - 1); in dsm_label_utf16s_to_utf8s()
163 return -1; in dsm_get_label()
168 return -1; in dsm_get_label()
170 tmp = obj->package.elements; in dsm_get_label()
171 if (obj->type == ACPI_TYPE_PACKAGE && obj->package.count == 2 && in dsm_get_label()
181 len = sysfs_emit(buf, "%llu\n", tmp->integer.value); in dsm_get_label()
193 return len > 0 ? len : -1; in dsm_get_label()
201 static DEVICE_ATTR_RO(label);
224 return a->mode; in acpi_attr_is_visible()