1#!/usr/bin/env python2 2# Copyright 2020 The Chromium OS Authors. All rights reserved. 3# Use of this source code is governed by a BSD-style license that can be 4# found in the LICENSE file. 5 6# Constants that will be used as key name in device health profile. 7SERVO_TOPOLOGY_LABEL_PREFIX = 'servo_topology' 8ST_DEVICE_MAIN = 'main' 9ST_DEVICE_CHILDREN = 'children' 10 11# Fields of servo topology item 12ST_DEVICE_SERIAL = 'serial' 13ST_DEVICE_TYPE = 'type' 14ST_DEVICE_PRODUCT = 'sysfs_product' 15ST_DEVICE_HUB_PORT = 'usb_hub_port' 16 17ST_CR50_TYPE = 'ccd_cr50' 18 19# Mapping between product names and types. 20ST_PRODUCT_TYPES = { 21 'Servo V4': 'servo_v4', 22 'Servo V4p1': 'servo_v4p1', 23 'Cr50': ST_CR50_TYPE, 24 'Servo Micro': 'servo_micro', 25 'C2D2': 'c2d2', 26 'Sweetberry': 'sweetberry' 27} 28 29# List unchangeable fields per device. 30SERVO_TOPOLOGY_ITEM_COMPARE_FIELDS = ( 31 ST_DEVICE_SERIAL, 32 ST_DEVICE_TYPE, 33 ST_DEVICE_PRODUCT, 34) 35