1# Copyright 2020 The Chromium OS Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5# Constants that will be used as key name in device health profile. 6SERVO_TOPOLOGY_LABEL_PREFIX = 'servo_topology' 7ST_DEVICE_MAIN = 'main' 8ST_DEVICE_CHILDREN = 'children' 9 10# Fields of servo topology item 11ST_DEVICE_SERIAL = 'serial' 12ST_DEVICE_TYPE = 'type' 13ST_DEVICE_PRODUCT = 'sysfs_product' 14ST_DEVICE_HUB_PORT = 'usb_hub_port' 15 16ST_V4_TYPE = 'servo_v4' 17ST_V4P1_TYPE = 'servo_v4p1' 18ST_CR50_TYPE = 'ccd_cr50' 19ST_C2D2_TYPE = 'c2d2' 20ST_SERVO_MICRO_TYPE = 'servo_micro' 21ST_SWEETBERRY_TYPE = 'sweetberry' 22 23# Mapping between product names and types. 24ST_PRODUCT_TYPES = { 25 'Servo V4': ST_V4_TYPE, 26 'Servo V4p1': ST_V4P1_TYPE, 27 'Cr50': ST_CR50_TYPE, 28 'Servo Micro': ST_SERVO_MICRO_TYPE, 29 'C2D2': ST_C2D2_TYPE, 30 'Sweetberry': ST_SWEETBERRY_TYPE 31} 32 33# Mapping vid-pid to servo types 34VID_PID_SERVO_TYPES = { 35 '18d1:501b': ST_V4_TYPE, 36 '18d1:520d': ST_V4P1_TYPE, 37 '18d1:5014': ST_CR50_TYPE, 38 '18d1:501a': ST_SERVO_MICRO_TYPE, 39 '18d1:5041': ST_C2D2_TYPE, 40 '18d1:5020': ST_SWEETBERRY_TYPE 41} 42 43# List unchangeable fields per device. 44SERVO_TOPOLOGY_ITEM_COMPARE_FIELDS = ( 45 ST_DEVICE_SERIAL, 46 ST_DEVICE_TYPE, 47 ST_DEVICE_PRODUCT, 48) 49