| 94 | } |
| 95 | |
| 96 | int find_smbus_dev_rev(uint16_t vendor, uint16_t device) |
| 97 | { |
| 98 | struct pci_dev *smbus_dev = pci_dev_find(vendor, device); |
| 99 | if (!smbus_dev) { |
| 100 | printf("No SMBus device with ID %04X:%04X found.\n", vendor, device); |
| 101 | perror("ERROR: SMBus device not found.\n"); |
| 102 | return -1; |
| 103 | } |
| 104 | return pci_read_byte(smbus_dev, PCI_REVISION_ID); |
| 105 | } |
| 106 | |
| 107 | static void print_version(void) |
| 108 | { |
no test coverage detected