From bf24ab3d5314efd69fb7ca69ee64a84f9de0fcfc Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Fri, 15 Aug 2025 22:49:21 -0500 Subject: [PATCH] Store name in ENESMBusController to avoid setting it in detector --- .../ENESMBusController/ENESMBusController.cpp | 195 ++++++++++++------ .../ENESMBusController/ENESMBusController.h | 13 +- .../ENESMBusControllerDetect.cpp | 11 +- .../RGBController_ENESMBus.cpp | 31 ++- .../ENESMBusController/ROGArionDetect.cpp | 2 +- .../XPGSpectrixS40GDetect_Linux.cpp | 2 +- .../XPGSpectrixS40GDetect_Windows.cpp | 2 +- 7 files changed, 160 insertions(+), 96 deletions(-) diff --git a/Controllers/ENESMBusController/ENESMBusController.cpp b/Controllers/ENESMBusController/ENESMBusController.cpp index d860961c..e47cd7bc 100644 --- a/Controllers/ENESMBusController/ENESMBusController.cpp +++ b/Controllers/ENESMBusController/ENESMBusController.cpp @@ -29,26 +29,30 @@ static const char* ene_channels[] = /* ENE channel strings "Unknown", }; -ENESMBusController::ENESMBusController(ENESMBusInterface* interface, ene_dev_id dev) +ENESMBusController::ENESMBusController(ENESMBusInterface* interface, ene_dev_id dev, std::string dev_name, device_type dev_type) { this->interface = interface; this->dev = dev; + this->name = dev_name; + this->type = dev_type; supports_mode_14 = false; if(interface->GetInterfaceType() != ENE_INTERFACE_TYPE_ROG_ARION) { UpdateDeviceName(); - // Read the device configuration table - for (int i = 0; i < 64; i++) + /*-------------------------------------------------*\ + | Read the device configuration table | + \*-------------------------------------------------*/ + for(int i = 0; i < 64; i++) { config_table[i] = ENERegisterRead(ENE_REG_CONFIG_TABLE + i); } - /*-----------------------------------------------------------------*\ - | If this is running with TRACE or higher loglevel then | - | dump the entire Feature list to log | - \*-----------------------------------------------------------------*/ + /*-------------------------------------------------*\ + | If this is running with TRACE or higher loglevel | + | then dump the entire Feature list to log | + \*-------------------------------------------------*/ if(LogManager::get()->getLoglevel() >= LL_TRACE) { LOG_TRACE("[ENE SMBus] ENE config table for 0x%02X:", dev); @@ -79,35 +83,47 @@ ENESMBusController::ENESMBusController(ENESMBusInterface* interface, ene_dev_id memset(config_table, 0, sizeof(config_table)); config_table[ENE_CONFIG_LED_COUNT] = 4; config_table[0x03] = 4; - strcpy(device_name, "ROG STRIX ARION"); + strcpy(device_version, "ROG STRIX ARION"); } - // Read LED count from configuration table + /*-----------------------------------------------------*\ + | Read LED count from configuration table | + \*-----------------------------------------------------*/ led_count = config_table[ENE_CONFIG_LED_COUNT]; - // LED-0116 - First generation motherboard controller - if (strcmp(device_name, "LED-0116") == 0) + /*-----------------------------------------------------*\ + | LED-0116 - First generation motherboard controller | + \*-----------------------------------------------------*/ + if(strcmp(device_version, "LED-0116") == 0) { direct_reg = ENE_REG_COLORS_DIRECT; effect_reg = ENE_REG_COLORS_EFFECT; channel_cfg = ENE_CONFIG_CHANNEL_V1; } - // DIMM_LED-0102 - First generation DRAM controller (Trident Z RGB) - else if (strcmp(device_name, "DIMM_LED-0102") == 0) + /*-----------------------------------------------------*\ + | DIMM_LED-0102 - First generation DRAM controller | + | (Trident Z RGB) | + \*-----------------------------------------------------*/ + else if(strcmp(device_version, "DIMM_LED-0102") == 0) { direct_reg = ENE_REG_COLORS_DIRECT; effect_reg = ENE_REG_COLORS_EFFECT; channel_cfg = ENE_CONFIG_CHANNEL_V1; } - // AUDA0-E6K5-0101 - Second generation DRAM controller (Geil Super Luce) - else if (strcmp(device_name, "AUDA0-E6K5-0101") == 0) + /*-----------------------------------------------------*\ + | AUDA0-E6K5-0101 - Second generation DRAM controller | + | (Geil Super Luce) | + \*-----------------------------------------------------*/ + else if(strcmp(device_version, "AUDA0-E6K5-0101") == 0) { direct_reg = ENE_REG_COLORS_DIRECT_V2; effect_reg = ENE_REG_COLORS_EFFECT_V2; channel_cfg = ENE_CONFIG_CHANNEL_V1; - // Check for Mode 14 support, only known to exist on modules where the - // DRAM 3 zone ID exists + /*-------------------------------------------------*\ + | Check for Mode 14 support, only known to exist on | + | modules where the DRAM 3 zone ID exists | + \*-------------------------------------------------*/ for(std::size_t cfg_zone_idx = 0; cfg_zone_idx < ENE_NUM_ZONES; cfg_zone_idx++) { if(config_table[channel_cfg + cfg_zone_idx] == (unsigned char)ENE_LED_CHANNEL_DRAM_3) @@ -117,109 +133,154 @@ ENESMBusController::ENESMBusController(ENESMBusInterface* interface, ene_dev_id } } } - // AUMA0-E6K5-0106 - Second generation motherboard controller - else if (strcmp(device_name, "AUMA0-E6K5-0106") == 0) + /*-----------------------------------------------------*\ + | AUMA0-E6K5-0106 - Second generation motherboard | + | controller | + \*-----------------------------------------------------*/ + else if(strcmp(device_version, "AUMA0-E6K5-0106") == 0) { direct_reg = ENE_REG_COLORS_DIRECT_V2; effect_reg = ENE_REG_COLORS_EFFECT_V2; channel_cfg = ENE_CONFIG_CHANNEL_V2; } - // AUMA0-E6K5-0105 - Second generation motherboard controller - else if (strcmp(device_name, "AUMA0-E6K5-0105") == 0) + /*-----------------------------------------------------*\ + | AUMA0-E6K5-0105 - Second generation motherboard | + | controller | + \*-----------------------------------------------------*/ + else if(strcmp(device_version, "AUMA0-E6K5-0105") == 0) { direct_reg = ENE_REG_COLORS_DIRECT_V2; effect_reg = ENE_REG_COLORS_EFFECT_V2; channel_cfg = ENE_CONFIG_CHANNEL_V2; } - // AUMA0-E6K5-0104 - Second generation motherboard controller - else if (strcmp(device_name, "AUMA0-E6K5-0104") == 0) + /*-----------------------------------------------------*\ + | AUMA0-E6K5-0104 - Second generation motherboard | + | controller | + \*-----------------------------------------------------*/ + else if(strcmp(device_version, "AUMA0-E6K5-0104") == 0) { direct_reg = ENE_REG_COLORS_DIRECT_V2; effect_reg = ENE_REG_COLORS_EFFECT_V2; channel_cfg = ENE_CONFIG_CHANNEL_V2; } - // AUMA0-E8K4-0101 - First generation motherboard controller - else if (strcmp(device_name, "AUMA0-E8K4-0101") == 0) + /*-----------------------------------------------------*\ + | AUMA0-E8K4-0101 - First generation motherboard | + | controller | + \*-----------------------------------------------------*/ + else if(strcmp(device_version, "AUMA0-E8K4-0101") == 0) { direct_reg = ENE_REG_COLORS_DIRECT; effect_reg = ENE_REG_COLORS_EFFECT; channel_cfg = ENE_CONFIG_CHANNEL_V1; } - // AUMA0-E6K5-0107 - Second generation GPU controller - else if (strcmp(device_name, "AUMA0-E6K5-0107") == 0) + /*-----------------------------------------------------*\ + | AUMA0-E6K5-0107 - Second generation GPU controller | + \*-----------------------------------------------------*/ + else if(strcmp(device_version, "AUMA0-E6K5-0107") == 0) { direct_reg = ENE_REG_COLORS_DIRECT_V2; effect_reg = ENE_REG_COLORS_EFFECT_V2; channel_cfg = ENE_CONFIG_CHANNEL_V2; - // Read LED count from configuration table + /*-------------------------------------------------*\ + | Read LED count from configuration table | + \*-------------------------------------------------*/ led_count = config_table[ENE_CONFIG_LED_COUNT_0107]; } - // AUMA0-E6K5-1110 - Third generation GPU controller? - // found an ASUS ROG Strix 4080 OC, seems to be equal to AUMA0-E6K5-0107 - else if (strcmp(device_name, "AUMA0-E6K5-1110") == 0) + /*-----------------------------------------------------*\ + | AUMA0-E6K5-1110 - Third generation GPU controller? | + | found an ASUS ROG Strix 4080 OC, seems to be equal to | + | AUMA0-E6K5-0107 | + \*-----------------------------------------------------*/ + else if(strcmp(device_version, "AUMA0-E6K5-1110") == 0) { direct_reg = ENE_REG_COLORS_DIRECT_V2; effect_reg = ENE_REG_COLORS_EFFECT_V2; channel_cfg = ENE_CONFIG_CHANNEL_V2; - // Read LED count from configuration table + /*-------------------------------------------------*\ + | Read LED count from configuration table | + \*-------------------------------------------------*/ led_count = config_table[ENE_CONFIG_LED_COUNT_1110]; } - // AUMA0-E6K5-1111 - Fourth generation GPU controller? - // found on ASUS ROG Strix 4090 OC EVA-02 Edition, seems to be equal to AUMA0-E6K5-0107 - else if (strcmp(device_name, "AUMA0-E6K5-1111") == 0) + /*-----------------------------------------------------*\ + | AUMA0-E6K5-1111 - Fourth generation GPU controller? | + | found on ASUS ROG Strix 4090 OC EVA-02 Edition, seems | + | to be equal to AUMA0-E6K5-0107 | + \*-----------------------------------------------------*/ + else if(strcmp(device_version, "AUMA0-E6K5-1111") == 0) { direct_reg = ENE_REG_COLORS_DIRECT_V2; effect_reg = ENE_REG_COLORS_EFFECT_V2; channel_cfg = ENE_CONFIG_CHANNEL_V2; - // Read LED count from configuration table + /*-------------------------------------------------*\ + | Read LED count from configuration table | + \*-------------------------------------------------*/ led_count = config_table[ENE_CONFIG_LED_COUNT_0107]; } - // AUMA0-E6K5-1107 - Second generation GPU controller - // Found on ASUS TUF 4070 TI OC, seems to be equal to AUMA0-E6K5-0107 - else if (strcmp(device_name, "AUMA0-E6K5-1107") == 0) + /*-----------------------------------------------------*\ + | AUMA0-E6K5-1107 - Second generation GPU controller | + | Found on ASUS TUF 4070 TI OC, seems to be equal to | + | AUMA0-E6K5-0107 | + \*-----------------------------------------------------*/ + else if(strcmp(device_version, "AUMA0-E6K5-1107") == 0) { direct_reg = ENE_REG_COLORS_DIRECT_V2; effect_reg = ENE_REG_COLORS_EFFECT_V2; channel_cfg = ENE_CONFIG_CHANNEL_V2; - // Read LED count from configuration table + /*-------------------------------------------------*\ + | Read LED count from configuration table | + \*-------------------------------------------------*/ led_count = config_table[ENE_CONFIG_LED_COUNT_0107]; } - // AUMA0-E6K5-0008 - // Found on ASUS STRIX 4070 Super OC - else if (strcmp(device_name, "AUMA0-E6K5-0008") == 0) + /*-----------------------------------------------------*\ + | AUMA0-E6K5-0008 | + | Found on ASUS STRIX 4070 Super OC | + \*-----------------------------------------------------*/ + else if(strcmp(device_version, "AUMA0-E6K5-0008") == 0) { direct_reg = ENE_REG_COLORS_DIRECT_V2; effect_reg = ENE_REG_COLORS_EFFECT_V2; channel_cfg = ENE_CONFIG_CHANNEL_V1; - // Read LED count from configuration table + /*-------------------------------------------------*\ + | Read LED count from configuration table | + \*-------------------------------------------------*/ led_count = config_table[ENE_CONFIG_LED_COUNT_0107]; } - // AUMA0-E6K5-1113 - // Found on ASUS ASTRAL 5080 OC - else if (strcmp(device_name, "AUMA0-E6K5-1113") == 0) + /*-----------------------------------------------------*\ + | AUMA0-E6K5-1113 | + | Found on ASUS ASTRAL 5080 OC | + \*-----------------------------------------------------*/ + else if(strcmp(device_version, "AUMA0-E6K5-1113") == 0) { direct_reg = ENE_REG_COLORS_DIRECT_V2; effect_reg = ENE_REG_COLORS_EFFECT_V2; channel_cfg = ENE_CONFIG_CHANNEL_V2; - // Read LED count from configuration table + /*-------------------------------------------------*\ + | Read LED count from configuration table | + \*-------------------------------------------------*/ led_count = config_table[ENE_CONFIG_LED_COUNT_0107]; } - // ROG ARION - ASUS ROG Arion external SSD enclosure - // This device does not support ENE read, so we fake the device name string - // if the interface is ROG Arion type. It uses second generation registers. - else if(strcmp(device_name, "ROG STRIX ARION") == 0) + /*-----------------------------------------------------*\ + | ROG ARION - ASUS ROG Arion external SSD enclosure | + | This device does not support ENE read, so we fake the | + | device name string if the interface is ROG Arion type.| + | It uses second generation registers. | + \*-----------------------------------------------------*/ + else if(strcmp(device_version, "ROG STRIX ARION") == 0) { direct_reg = ENE_REG_COLORS_DIRECT_V2; effect_reg = ENE_REG_COLORS_EFFECT_V2; channel_cfg = ENE_CONFIG_CHANNEL_V2; } - // Assume first generation controller if string does not match + /*-----------------------------------------------------*\ + | Assume first generation controller if string does not | + | match | + \*-----------------------------------------------------*/ else { direct_reg = ENE_REG_COLORS_DIRECT; @@ -233,12 +294,7 @@ ENESMBusController::~ENESMBusController() delete interface; } -std::string ENESMBusController::GetDeviceName() -{ - return(device_name); -} - -std::string ENESMBusController::GetDeviceLocation() +std::string ENESMBusController::GetLocation() { std::string return_string = interface->GetLocation(); @@ -250,9 +306,24 @@ std::string ENESMBusController::GetDeviceLocation() return(return_string); } +std::string ENESMBusController::GetName() +{ + return(name); +} + +std::string ENESMBusController::GetVersion() +{ + return(device_version); +} + +device_type ENESMBusController::GetType() +{ + return(type); +} + const char * ENESMBusController::GetChannelName(unsigned int cfg_zone) { - LOG_TRACE("[%s] Config table for zone %02d: %02d", device_name, cfg_zone, config_table[channel_cfg + cfg_zone]); + LOG_TRACE("[%s] Config table for zone %02d: %02d", device_version, cfg_zone, config_table[channel_cfg + cfg_zone]); if(interface->GetInterfaceType() == ENE_INTERFACE_TYPE_ROG_ARION) { @@ -313,7 +384,7 @@ const char * ENESMBusController::GetChannelName(unsigned int cfg_zone) unsigned int ENESMBusController::GetLEDCount(unsigned int cfg_zone) { - LOG_TRACE("[%s] LED Count for zone %02d: %02d", device_name, cfg_zone, config_table[0x03 + cfg_zone]); + LOG_TRACE("[%s] LED Count for zone %02d: %02d", device_version, cfg_zone, config_table[0x03 + cfg_zone]); return(config_table[0x03 + cfg_zone]); } @@ -452,7 +523,7 @@ void ENESMBusController::UpdateDeviceName() { for (int i = 0; i < 16; i++) { - device_name[i] = ENERegisterRead(ENE_REG_DEVICE_NAME + i); + device_version[i] = ENERegisterRead(ENE_REG_DEVICE_NAME + i); } } diff --git a/Controllers/ENESMBusController/ENESMBusController.h b/Controllers/ENESMBusController/ENESMBusController.h index 97eca646..b2b105b9 100644 --- a/Controllers/ENESMBusController/ENESMBusController.h +++ b/Controllers/ENESMBusController/ENESMBusController.h @@ -100,11 +100,14 @@ enum class ENESMBusController { public: - ENESMBusController(ENESMBusInterface* interface, ene_dev_id dev); + ENESMBusController(ENESMBusInterface* interface, ene_dev_id dev, std::string dev_name, device_type dev_type); ~ENESMBusController(); - std::string GetDeviceName(); - std::string GetDeviceLocation(); + std::string GetLocation(); + std::string GetName(); + std::string GetVersion(); + device_type GetType(); + const char* GetChannelName(unsigned int cfg_zone); unsigned int GetLEDCount(unsigned int cfg_zone); unsigned char GetLEDRed(unsigned int led); @@ -129,7 +132,7 @@ public: void ENERegisterWriteBlock(ene_register reg, unsigned char * data, unsigned char sz); private: - char device_name[16]; + char device_version[16]; unsigned char config_table[64]; unsigned int led_count; ene_register direct_reg; @@ -138,4 +141,6 @@ private: ENESMBusInterface* interface; ene_dev_id dev; bool supports_mode_14; + std::string name; + device_type type; }; diff --git a/Controllers/ENESMBusController/ENESMBusControllerDetect.cpp b/Controllers/ENESMBusController/ENESMBusControllerDetect.cpp index 98b53e7e..9bb3e738 100644 --- a/Controllers/ENESMBusController/ENESMBusControllerDetect.cpp +++ b/Controllers/ENESMBusController/ENESMBusControllerDetect.cpp @@ -247,7 +247,7 @@ void DetectENESMBusDRAMControllers(std::vector &busses) if (TestForENESMBusController(busses[bus], ene_ram_addresses[address_list_idx])) { ENESMBusInterface_i2c_smbus* interface = new ENESMBusInterface_i2c_smbus(busses[bus]); - ENESMBusController* controller = new ENESMBusController(interface, ene_ram_addresses[address_list_idx]); + ENESMBusController* controller = new ENESMBusController(interface, ene_ram_addresses[address_list_idx], "ENE DRAM", DEVICE_TYPE_DRAM); RGBController_ENESMBus* rgb_controller = new RGBController_ENESMBus(controller); ResourceManager::get()->RegisterRGBController(rgb_controller); @@ -288,11 +288,9 @@ void DetectENESMBusMotherboardControllers(std::vector &bus DMIInfo dmi; ENESMBusInterface_i2c_smbus* interface = new ENESMBusInterface_i2c_smbus(busses[bus]); - ENESMBusController* controller = new ENESMBusController(interface, aura_mobo_addresses[address_list_idx]); + ENESMBusController* controller = new ENESMBusController(interface, aura_mobo_addresses[address_list_idx], "ASUS " + dmi.getMainboard(), DEVICE_TYPE_MOTHERBOARD); RGBController_ENESMBus* rgb_controller = new RGBController_ENESMBus(controller); - rgb_controller->name = "ASUS " + dmi.getMainboard(); - ResourceManager::get()->RegisterRGBController(rgb_controller); } @@ -322,12 +320,9 @@ void DetectENESMBusGPUControllers(i2c_smbus_interface* bus, uint8_t i2c_addr, co if(TestForENESMBusController(bus, i2c_addr)) { ENESMBusInterface_i2c_smbus* interface = new ENESMBusInterface_i2c_smbus(bus); - ENESMBusController* controller = new ENESMBusController(interface, i2c_addr); + ENESMBusController* controller = new ENESMBusController(interface, i2c_addr, name, DEVICE_TYPE_GPU); RGBController_ENESMBus* rgb_controller = new RGBController_ENESMBus(controller); - rgb_controller->name = name; - rgb_controller->type = DEVICE_TYPE_GPU; - ResourceManager::get()->RegisterRGBController(rgb_controller); } else diff --git a/Controllers/ENESMBusController/RGBController_ENESMBus.cpp b/Controllers/ENESMBusController/RGBController_ENESMBus.cpp index 5640a18b..789974f8 100644 --- a/Controllers/ENESMBusController/RGBController_ENESMBus.cpp +++ b/Controllers/ENESMBusController/RGBController_ENESMBus.cpp @@ -27,17 +27,17 @@ RGBController_ENESMBus::RGBController_ENESMBus(ENESMBusController * controller_ptr) { - controller = controller_ptr; + controller = controller_ptr; /*---------------------------------------------------------*\ | Get ENEController settings | \*---------------------------------------------------------*/ - json ene_settings = ResourceManager::get()->GetSettingsManager()->GetSettings("ENESMBusSettings"); + json ene_settings = ResourceManager::get()->GetSettingsManager()->GetSettings("ENESMBusSettings"); /*---------------------------------------------------------*\ | Check if save to device is enabled | \*---------------------------------------------------------*/ - unsigned int save_flag = 0; + unsigned int save_flag = 0; if(ene_settings.contains("enable_save")) { @@ -51,36 +51,29 @@ RGBController_ENESMBus::RGBController_ENESMBus(ENESMBusController * controller_p | Determine name and type (DRAM or Motherboard) by checking | | the ENE controller's version string | \*---------------------------------------------------------*/ - version = controller->GetDeviceName(); - location = controller->GetDeviceLocation(); + name = controller->GetName(); + description = "ENE SMBus Device"; + version = controller->GetVersion(); + location = controller->GetLocation(); + type = controller->GetType(); if((version.find("DIMM_LED") != std::string::npos) || (version.find("AUDA") != std::string::npos) ) { - type = DEVICE_TYPE_DRAM; - name = "ENE DRAM"; - vendor = "ENE"; + vendor = "ENE"; } else if(version.find("ROG STRIX ARION") != std::string::npos) { - type = DEVICE_TYPE_STORAGE; - name = "ASUS ROG Strix Arion"; - vendor = "ASUS"; + vendor = "ASUS"; } else if(location.find("NVMe:") != std::string::npos) { - type = DEVICE_TYPE_STORAGE; - name = "XPG Spectrix S40G"; - vendor = "XPG"; + vendor = "XPG"; } else { - type = DEVICE_TYPE_MOTHERBOARD; - name = "ASUS Aura Motherboard"; - vendor = "ASUS"; + vendor = "ASUS"; } - description = "ENE SMBus Device"; - mode Direct; Direct.name = "Direct"; Direct.value = 0xFFFF; diff --git a/Controllers/ENESMBusController/ROGArionDetect.cpp b/Controllers/ENESMBusController/ROGArionDetect.cpp index bd9bfe80..65c7be44 100644 --- a/Controllers/ENESMBusController/ROGArionDetect.cpp +++ b/Controllers/ENESMBusController/ROGArionDetect.cpp @@ -34,7 +34,7 @@ void DetectROGArionControllers() if(dev) { ENESMBusInterface_ROGArion* interface = new ENESMBusInterface_ROGArion(dev, info->path); - ENESMBusController* controller = new ENESMBusController(interface, 0x67); + ENESMBusController* controller = new ENESMBusController(interface, 0x67, "Asus ROG Strix Arion", DEVICE_TYPE_STORAGE); RGBController_ENESMBus* rgb_controller = new RGBController_ENESMBus(controller); ResourceManager::get()->RegisterRGBController(rgb_controller); diff --git a/Controllers/ENESMBusController/XPGSpectrixS40GDetect_Linux.cpp b/Controllers/ENESMBusController/XPGSpectrixS40GDetect_Linux.cpp index f684db26..8bde74c5 100644 --- a/Controllers/ENESMBusController/XPGSpectrixS40GDetect_Linux.cpp +++ b/Controllers/ENESMBusController/XPGSpectrixS40GDetect_Linux.cpp @@ -79,7 +79,7 @@ void DetectSpectrixS40GControllers() if(nvme_fd > 0) { ENESMBusInterface_SpectrixS40G* interface = new ENESMBusInterface_SpectrixS40G(nvme_fd, nvme_dev_buf); - ENESMBusController* controller = new ENESMBusController(interface, 0x67); + ENESMBusController* controller = new ENESMBusController(interface, 0x67, "XPG Spectrix S40G", DEVICE_TYPE_STORAGE); RGBController_ENESMBus* rgb_controller = new RGBController_ENESMBus(controller); ResourceManager::get()->RegisterRGBController(rgb_controller); diff --git a/Controllers/ENESMBusController/XPGSpectrixS40GDetect_Windows.cpp b/Controllers/ENESMBusController/XPGSpectrixS40GDetect_Windows.cpp index 5b90e051..240604a1 100644 --- a/Controllers/ENESMBusController/XPGSpectrixS40GDetect_Windows.cpp +++ b/Controllers/ENESMBusController/XPGSpectrixS40GDetect_Windows.cpp @@ -113,7 +113,7 @@ void DetectSpectrixS40GControllers() if(nvme_fd != INVALID_HANDLE_VALUE) { ENESMBusInterface_SpectrixS40G* interface = new ENESMBusInterface_SpectrixS40G(nvme_fd, dev_name); - ENESMBusController* controller = new ENESMBusController(interface, 0x67); + ENESMBusController* controller = new ENESMBusController(interface, 0x67, "XPG Spectrix S40G", DEVICE_TYPE_STORAGE); RGBController_ENESMBus* rgb_controller = new RGBController_ENESMBus(controller); ResourceManager::get()->RegisterRGBController(rgb_controller);