Rework EVGAPascalGPUController to use I2C PCI detector and store name in controller to avoid setting it in detector

This commit is contained in:
Adam Honse 2025-08-07 22:39:49 -05:00
parent c32663bb32
commit df75659778
5 changed files with 55 additions and 82 deletions

View file

@ -11,10 +11,11 @@
#include "EVGAGPUv1Controller.h"
EVGAGPUv1Controller::EVGAGPUv1Controller(i2c_smbus_interface* bus, evga_dev_id dev)
EVGAGPUv1Controller::EVGAGPUv1Controller(i2c_smbus_interface* bus, evga_dev_id dev, std::string dev_name)
{
this->bus = bus;
this->dev = dev;
this->bus = bus;
this->dev = dev;
this->name = dev_name;
}
EVGAGPUv1Controller::~EVGAGPUv1Controller()
@ -32,6 +33,11 @@ std::string EVGAGPUv1Controller::GetDeviceLocation()
return("I2C: " + return_string);
}
std::string EVGAGPUv1Controller::GetDeviceName()
{
return(name);
}
unsigned char EVGAGPUv1Controller::GetMode()
{
return(bus->i2c_smbus_read_byte_data(dev, EVGA_GPU_V1_REG_MODE));