Skip to content

Commit

Permalink
add Legion Slim 7 16IRH8 support
Browse files Browse the repository at this point in the history
* issue 123
  • Loading branch information
MrDuartePT committed Oct 19, 2023
1 parent f364d94 commit 03a2ec7
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 @@ -513,6 +513,25 @@ static const struct model_config model_kwcn = {
.ramio_size = 0x600
};

static const struct model_config model_m0cn = {
.registers = &ec_register_offsets_v0,
.check_embedded_controller_id = true,
.embedded_controller_id = 0x8227,
.memoryio_physical_ec_start = 0xC400,
.memoryio_size = 0x300,
.has_minifancurve = false,
.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 = false,
.ramio_physical_start = 0xFE0B0400,
.ramio_size = 0x600
};

static const struct model_config model_m2cn = {
.registers = &ec_register_offsets_v0,
.check_embedded_controller_id = true,
Expand Down Expand Up @@ -1079,6 +1098,15 @@ static const struct dmi_system_id optimistic_allowlist[] = {
},
.driver_data = (void *)&model_m2cn
},
{
// e.g. Legion Slim 7 16IRH8 (2023) with RTX 4070
.ident = "M0CN",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
DMI_MATCH(DMI_BIOS_VERSION, "M0CN"),
},
.driver_data = (void *)&model_m0cn
},
{
// e.g. Yoga Slim 7-14ARE05
.ident = "DMCN",
Expand Down

0 comments on commit 03a2ec7

Please sign in to comment.