Fill in location in GigabyteSuperIORGBController

This commit is contained in:
Adam Honse 2025-08-14 10:19:50 -05:00
parent 719d7b8801
commit 82cb9fb7d0
3 changed files with 11 additions and 2 deletions

View file

@ -23,6 +23,13 @@ GigabyteSuperIORGBController::~GigabyteSuperIORGBController()
} }
std::string GigabyteSuperIORGBController::GetDeviceLocation()
{
char hex[12];
snprintf(hex, sizeof(hex), "0x%X", gig_sioaddr);
return("SIO: " + std::string(hex));
}
std::string GigabyteSuperIORGBController::GetDeviceName() std::string GigabyteSuperIORGBController::GetDeviceName()
{ {
return(name); return(name);

View file

@ -135,6 +135,7 @@ public:
GigabyteSuperIORGBController(int sioaddr, std::string dev_name); GigabyteSuperIORGBController(int sioaddr, std::string dev_name);
~GigabyteSuperIORGBController(); ~GigabyteSuperIORGBController();
std::string GetDeviceLocation();
std::string GetDeviceName(); std::string GetDeviceName();
unsigned int GetMode(); unsigned int GetMode();
@ -144,6 +145,6 @@ public:
void ChipEntry(); void ChipEntry();
void ChipExit(); void ChipExit();
private: private:
int gig_sioaddr; int gig_sioaddr;
std::string name; std::string name;
}; };

View file

@ -93,6 +93,7 @@ RGBController_GigabyteSuperIORGB::RGBController_GigabyteSuperIORGB(GigabyteSuper
vendor = "Gigabyte"; vendor = "Gigabyte";
type = DEVICE_TYPE_MOTHERBOARD; type = DEVICE_TYPE_MOTHERBOARD;
description = "Gigabyte SuperIO RGB Device"; description = "Gigabyte SuperIO RGB Device";
location = controller->GetDeviceLocation();
mode Direct; mode Direct;
Direct.name = "Direct"; Direct.name = "Direct";