Added fan controls

This commit is contained in:
2025-01-30 01:15:18 -08:00
parent bcd4457c2f
commit 3a3fa98eab
5 changed files with 289 additions and 83 deletions
+4 -6
View File
@@ -27,9 +27,7 @@ int find_evga_gpu_i2cs(struct card_info *infos, int max_gpus)
/* make sure we can open the i2c device */
if(dir == NULL)
{
return -1;
}
/* loop over all i2c devices */
while((ent = readdir(dir)) != NULL)
@@ -50,10 +48,10 @@ int find_evga_gpu_i2cs(struct card_info *infos, int max_gpus)
/* See if it's a matching device for a supported EVGA card */
for (int i = 0; i < (sizeof(evga_pci_ids) / sizeof(struct gpu_pci_info)); i++) {
if (pci_vendor == evga_pci_ids[i].vendor_id &&
pci_device == evga_pci_ids[i].device_id &&
pci_subsystem_vendor == evga_pci_ids[i].subvendor_id &&
pci_subsystem_device == evga_pci_ids[i].subdevice_id) {
if (pci_vendor == evga_pci_ids[i].vendor_id &&
pci_device == evga_pci_ids[i].device_id &&
pci_subsystem_vendor == evga_pci_ids[i].subvendor_id &&
pci_subsystem_device == evga_pci_ids[i].subdevice_id) {
/* Matched all PCI IDs, check for good firmware read */
strcpy(dev_file, "/dev/");