Skip to content

Commit

Permalink
kernel-driver: add Legion 5 15IMH6
Browse files Browse the repository at this point in the history
Signed-off-by: ston <ston.jia@outlook.com>
  • Loading branch information
st0nie committed Apr 28, 2024
1 parent 16868db commit 4b35e0d
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions kernel_module/legion-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,25 @@ static const struct model_config model_kwcn = {
.ramio_size = 0x600
};

static const struct model_config model_g8cn = {
.registers = &ec_register_offsets_v0,
.check_embedded_controller_id = true,
.embedded_controller_id = 0x5507,
.memoryio_physical_ec_start = 0xC400,
.memoryio_size = 0x300,
.has_minifancurve = true,
.has_custom_powermode = true,
.access_method_powermode = ACCESS_METHOD_WMI,
.access_method_keyboard = ACCESS_METHOD_WMI,
.access_method_fanspeed = ACCESS_METHOD_WMI3,
.access_method_temperature = ACCESS_METHOD_WMI3,
.access_method_fancurve = ACCESS_METHOD_WMI3,
.access_method_fanfullspeed = ACCESS_METHOD_WMI,
.acpi_check_dev = true,
.ramio_physical_start = 0xFE0B0400,
.ramio_size = 0x600
};

static const struct model_config model_m0cn = {
.registers = &ec_register_offsets_v0,
.check_embedded_controller_id = true,
Expand Down Expand Up @@ -1099,6 +1118,15 @@ static const struct dmi_system_id optimistic_allowlist[] = {
},
.driver_data = (void *)&model_kwcn
},
{
// e.g. Legion 5 15IMH6
.ident = "G8CN",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
DMI_MATCH(DMI_BIOS_VERSION, "G8CN"),
},
.driver_data = (void *)&model_g8cn
},
{
// e.g. Legion Pro 5 2023 or R9000P
.ident = "LPCN",
Expand Down

0 comments on commit 4b35e0d

Please sign in to comment.