Lines Matching full:values
27 # Status values that indicate we should exclude the item
30 if not item['values']:
74 """Unwrap a HWID item block into a dictionary for non-null values.
80 values:
86 values:
88 values:
97 The resulting output is a dict with unwrapped item values:
110 any remaining values in the HWID data.
208 values = item.get('values', {})
210 _maybe_delete(values, name)
212 _del_if_empty(item, 'values')
218 values = item.get('values', {})
223 # save HWID values
228 component.name = values.get('name', label)
236 values = item.get('values', {})
244 # save HWID values
249 if 'manufacturer' in values:
250 # We seem to have some bad manufacturer values in the battery component.
252 mfgr = values['manufacturer']
265 if 'model_name' in values:
266 component.battery.model = values['model_name']
270 if 'technology' in values:
271 tech = values['technology'].lower().replace('-', '')
287 values = item.get('values', {})
295 # save HWID values
300 if 'manufacturer' in values:
302 cbu.find_partner(bundle, values['manufacturer'], create=True).id)
312 if key in values:
313 setattr(component.bluetooth.usb, attr, values[key])
321 values = item.get('values', {})
329 # save HWID values
334 if 'manufacturer' in values:
336 cbu.find_partner(bundle, values['manufacturer'], create=True).id)
346 if key in values:
347 setattr(component.cellular.usb, attr, values[key])
355 values = item.get('values', {})
363 # save HWID values
367 model_re = re.compile( # reversed from HWID cpu model values
370 component.soc.cores = int(values.get('cores', 0))
373 if 'model' in values:
374 component.soc.model = values['model']
377 model_string = values['model'].lower()
396 values = item.get('values', {})
402 # save HWID values
406 if 'vendor' in values:
408 cbu.find_partner(bundle, values['vendor'], create=True).id)
410 component.display_panel.product_id = values.get('product_id', '')
411 component.display_panel.properties.width_px = int(values.get('width', 0))
412 component.display_panel.properties.height_px = int(values.get('height', 0))
419 values = item.get('values', {})
425 # save HWID values
429 component.memory.part_number = values.get('part', '')
430 component.memory.profile.size_megabytes = int(values.get('size', 0))
432 if 'timing' in values:
433 memory_type = values['timing'].split('-')[0]
452 values = item.get('values', {})
460 # save HWID values
464 component.ec_flash_chip.part_number = values.get('name', '')
467 if 'vendor' in values:
469 cbu.find_partner(bundle, values['vendor'], create=True).id)
477 values = item.get('values', {})
485 # save HWID values
489 component.ec.part_number = values.get('name', '')
492 if 'vendor' in values:
494 cbu.find_partner(bundle, values['vendor'], create=True).id)
502 values = item.get('values', {})
510 # save HWID values
514 component.system_flash_chip.part_number = values.get('name', '')
517 if 'vendor' in values:
519 cbu.find_partner(bundle, values['vendor'], create=True).id)
527 values = item.get('values', {})
533 component.name = values.get('model', label)
536 # save HWID values
540 component.storage.emmc5_fw_ver = values.get('emmc5_fw_ver', '')
541 component.storage.manfid = values.get('manfid', '')
542 component.storage.name = values.get('name', '')
543 component.storage.oemid = values.get('oemid', '')
544 component.storage.prv = values.get('prv', '')
545 component.storage.sectors = values.get('sectors', '')
551 if all(field in values for field in pcie_fields):
553 component.storage.pci.vendor_id = values['vendor']
554 component.storage.pci.device_id = values['device']
555 component.storage.pci.class_id = values['class']
558 if values.get('type', '').lower() == 'mmc':
562 if values.get('vendor', '').lower() == 'ata':
571 values = item.get('values', {})
577 component.name = values.get('name', label)
580 # save HWID values
585 if all(key in values for key in i2c_keys):
586 component.stylus.i2c.product = values['product']
587 component.stylus.i2c.vendor = values['vendor']
591 if all(key in values for key in usb_keys):
592 component.stylus.usb.product_id = values['product_id']
593 component.stylus.usb.vendor_id = values['vendor_id']
596 if 'bcd_device' in values:
597 component.stylus.usb.bcd_device = values['bcd_device']
600 if 'version' in values:
601 component.stylus.usb.bcd_device = values['version']
609 values = item.get('values', {})
615 component.name = values.get('model', label)
618 # save HWID values
626 if 'product' in values and 'vendor' in values:
629 component.touchpad.usb.vendor_id = values['vendor']
630 component.touchpad.usb.product_id = values['product']
633 elif 'fw_version' in values and 'fw_csum' in values:
636 component.touchpad.product_id = values.get('product_id', '')
637 component.touchpad.fw_version = values['fw_version']
638 component.touchpad.fw_checksum = values['fw_csum']
646 values = item.get('values', {})
654 # save HWID values
658 component.tpm.manufacturer_info = values.get('manufacturer_info', '')
659 component.tpm.version = values.get('version', '')
667 values = item.get('values', {})
673 component.name = values.get('name', label)
676 # save HWID values
680 def oneof(values, keys, default=""): argument
682 if key in values:
683 return values[key]
688 values,
691 component.touchscreen.usb.vendor_id = oneof(values, ['vendor', 'vendor_id'])
692 component.touchscreen.usb.bcd_device = values.get('bcd_device', '')
707 values = item.get('values', {})
713 component.name = values.get('product', label)
716 # save HWID values
721 """Get one of a set of keys from values, or return a default value."""
728 if 'manufacturer' in values:
730 cbu.find_partner(bundle, values['manufacturer'], create=True).id)
734 host.product_id = get_oneof(values, ['idProduct', 'device'], '')
735 host.vendor_id = get_oneof(values, ['idVendor', 'vendor'], '')
736 host.bcd_device = get_oneof(values, ['bcdDevice', 'revision_id'], '')
743 values = item.get('values', {})
749 component.name = values.get('product', label)
752 # save HWID values
759 if values.get('bus_type') == 'usb' or \
760 all(key in values for key in usb_fields):
762 if 'manufacturer' in values:
764 cbu.find_partner(bundle, values['manufacturer'], create=True).id)
766 component.camera.usb.vendor_id = values.get('idVendor', '')
767 component.camera.usb.product_id = values.get('idProduct', '')
768 component.camera.usb.bcd_device = values.get('bcdDevice', '')
771 if values.get('bus_type') == 'pci' or \
772 all(key in values for key in pci_fields):
774 component.camera.pci.vendor_id = values.get('vendor', '')
775 component.camera.pci.device_id = values.get('device', '')
776 component.camera.pci.revision_id = values.get('revision_id', '')
785 values = item.get('values', {})
793 # save HWID values
797 component.wifi.pci.vendor_id = values.get('vendor', '')
798 component.wifi.pci.device_id = values.get('device', '')
799 component.wifi.pci.revision_id = values.get('revision_id', '')