Home | History | Annotate | Download | only in cros

Lines Matching refs:vid

75 def power_cycle_usb_vidpid(dut, board, vid, pid):
77 Power cycle a usb port on DUT via peripharel's VID and PID.
79 When only the VID and PID of the peripharel is known, a search is needed
80 to decide which port it connects to by its VID and PID and look up the gpio
86 @param vid: Vendor ID of the peripharel device.
89 @raise KeyError if the target device wasn't found by given VID and PID.
93 bus_idx, port_idx = get_port_number_from_vidpid(dut, vid, pid)
95 raise KeyError('Couldn\'t find target device, {}:{}.'.format(vid, pid))
106 def get_port_number_from_vidpid(dut, vid, pid):
114 @param vid: Vendor ID of the peripharel device.
121 cmd = 'lsusb -d {}:{}'.format(vid, pid)
124 target_bus_idx, target_dev_idx = get_bus_dev_id(lsusb_output, vid, pid)
133 def get_bus_dev_id(lsusb_output, vid, pid):
138 device is connected to based on the output of command 'lsusb -d VID:PID'.
140 @param lsusb_output: output of command 'lsusb -d VID:PID' running on DUT.
141 @param vid: Vendor ID of the peripharel device.
152 logging.info('find more than one device with VID:PID: %s:%s', vid, pid)
160 vid, pid, target_bus_idx, target_device_idx)