Skip to content

Commit

Permalink
kernel-driver: add NSCN
Browse files Browse the repository at this point in the history
for issue #209

Signed-off-by: ston <[email protected]>
  • Loading branch information
st0nie committed Apr 28, 2024
1 parent 4b35e0d commit 1d4e1d3
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 @@ -661,6 +661,25 @@ static const struct model_config model_k1cn = {
.ramio_size = 0x600
};

static const struct model_config model_nscn = {
.registers = &ec_register_offsets_v0,
.check_embedded_controller_id = true,
.embedded_controller_id = 0x5507,
.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 = true,
.ramio_physical_start = 0xFE0B0400,
.ramio_size = 0x600
};

static const struct model_config model_lpcn = {
.registers = &ec_register_offsets_v0,
.check_embedded_controller_id = true,
Expand Down Expand Up @@ -1154,6 +1173,15 @@ static const struct dmi_system_id optimistic_allowlist[] = {
},
.driver_data = (void *)&model_k1cn
},
{
// e.g. Lenovo 7 16IAX9
.ident = "NSCN",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
DMI_MATCH(DMI_BIOS_VERSION, "NSCN"),
},
.driver_data = (void *)&model_nscn
},
{
// e.g. Legion Y720
.ident = "4GCN",
Expand Down

0 comments on commit 1d4e1d3

Please sign in to comment.