From bcde251904b7d04b31db978256656dccd5af8df2 Mon Sep 17 00:00:00 2001 From: Amagi_Yukisaki Date: Tue, 3 Dec 2024 11:56:34 +0800 Subject: [PATCH] Added ITE 8638 support (#78) --- Sensors/SMCSuperIO/Devices.cpp | 18 ++++++++++++++++++ Sensors/SMCSuperIO/ITEDevice.cpp | 1 + Sensors/SMCSuperIO/Resources/IT8721F.plist | 6 ++++++ 3 files changed, 25 insertions(+) diff --git a/Sensors/SMCSuperIO/Devices.cpp b/Sensors/SMCSuperIO/Devices.cpp index 1c68ade..1bce357 100644 --- a/Sensors/SMCSuperIO/Devices.cpp +++ b/Sensors/SMCSuperIO/Devices.cpp @@ -750,6 +750,24 @@ class Device_0x8628 final : public GeneratedITEDevice_6 { }; +class Device_0x8638 final : public GeneratedITEDevice_6 { +public: + static SuperIODevice *createDevice(uint16_t deviceId) { + if (deviceId == 0x8638) + return new Device_0x8638(); + return nullptr; + } + + uint8_t getLdn() override { + return 0x04; + } + + const char* getModelName() override { + return "ITE IT8638"; + } + +}; + class Device_0x8686 final : public GeneratedITEDevice_6 { public: static SuperIODevice *createDevice(uint16_t deviceId) { diff --git a/Sensors/SMCSuperIO/ITEDevice.cpp b/Sensors/SMCSuperIO/ITEDevice.cpp index 9422989..6c1e0f2 100644 --- a/Sensors/SMCSuperIO/ITEDevice.cpp +++ b/Sensors/SMCSuperIO/ITEDevice.cpp @@ -381,6 +381,7 @@ namespace ITE { } else { if (strcmp(detectedDevice->getModelName(), "ITE IT8721F") || strcmp(detectedDevice->getModelName(), "ITE IT8728F") || strcmp(detectedDevice->getModelName(), "ITE IT8665E") || strcmp(detectedDevice->getModelName(), "ITE IT8686E") || strcmp(detectedDevice->getModelName(), "ITE IT8688E") || strcmp(detectedDevice->getModelName(), "ITE IT8689E") || strcmp(detectedDevice->getModelName(), "ITE IT8795E") || strcmp(detectedDevice->getModelName(), "ITE IT8628E") || + strcmp(detectedDevice->getModelName(), "ITE IT8638") || strcmp(detectedDevice->getModelName(), "ITE IT8625E") || strcmp(detectedDevice->getModelName(), "ITE IT8620E") || strcmp(detectedDevice->getModelName(), "ITE IT8613E") || strcmp(detectedDevice->getModelName(), "ITE IT8792E") || strcmp(detectedDevice->getModelName(), "ITE IT8655E") || strcmp(detectedDevice->getModelName(), "ITE IT8631E")) diff --git a/Sensors/SMCSuperIO/Resources/IT8721F.plist b/Sensors/SMCSuperIO/Resources/IT8721F.plist index b800fb3..8a54e40 100644 --- a/Sensors/SMCSuperIO/Resources/IT8721F.plist +++ b/Sensors/SMCSuperIO/Resources/IT8721F.plist @@ -30,6 +30,12 @@ DeviceID 0x8628 + + DisplayName + ITE IT8638 + DeviceID + 0x8638 + DisplayName ITE IT8686E