mirror of
https://github.com/wessel-novacustom/clevo-keyboard.git
synced 2024-11-15 03:34:01 +01:00
Change model ID for some models
This commit is contained in:
parent
68800661b4
commit
50ea0bb09f
|
@ -251,9 +251,9 @@ static int uw_get_tdp_min(u8 tdp_index)
|
|||
if (tdp_index > 2)
|
||||
return -EINVAL;
|
||||
|
||||
if (dmi_string_in(DMI_PRODUCT_SERIAL, "PH4TUX")) {
|
||||
if (uw_feats->model == 0x13) {
|
||||
tdp_min = tdp_min_ph4tux[tdp_index];
|
||||
} else if (dmi_string_in(DMI_PRODUCT_SERIAL, "PH4TRX")) {
|
||||
} else if (uw_feats->model == 0x12) {
|
||||
tdp_min = tdp_min_ph4trx[tdp_index];
|
||||
} else if (dmi_string_in(DMI_PRODUCT_SERIAL, "PH4TQX")) {
|
||||
tdp_min = tdp_min_ph4tqx[tdp_index];
|
||||
|
@ -278,9 +278,9 @@ static int uw_get_tdp_max(u8 tdp_index)
|
|||
if (tdp_index > 2)
|
||||
return -EINVAL;
|
||||
|
||||
if (dmi_string_in(DMI_PRODUCT_SERIAL, "PH4TUX")) {
|
||||
if (uw_feats->model == 0x13) {
|
||||
tdp_max = tdp_max_ph4tux[tdp_index];
|
||||
} else if (dmi_string_in(DMI_PRODUCT_SERIAL, "PH4TRX")) {
|
||||
} else if (uw_feats->model == 0x12) {
|
||||
tdp_max = tdp_max_ph4trx[tdp_index];
|
||||
} else if (dmi_string_in(DMI_PRODUCT_SERIAL, "PH4TQX")) {
|
||||
tdp_max = tdp_max_ph4tqx[tdp_index];
|
||||
|
|
|
@ -47,6 +47,7 @@ struct uniwill_interface_t {
|
|||
};
|
||||
|
||||
struct uniwill_device_features_t {
|
||||
u8 model;
|
||||
/**
|
||||
* Identification for uniwill_power_profile_v1
|
||||
*
|
||||
|
|
|
@ -185,6 +185,11 @@ EXPORT_SYMBOL(uniwill_get_active_interface_id);
|
|||
struct uniwill_device_features_t *uniwill_get_device_features(void)
|
||||
{
|
||||
struct uniwill_device_features_t *uw_feats = &uniwill_device_features;
|
||||
u32 status;
|
||||
|
||||
status = uniwill_read_ec_ram(0x0740, &uw_feats->model);
|
||||
if (status != 0)
|
||||
uw_feats->model = 0;
|
||||
|
||||
uw_feats->uniwill_profile_v1_two_profs = false
|
||||
|| dmi_match(DMI_BOARD_NAME, "PF5PU1G")
|
||||
|
@ -223,8 +228,8 @@ struct uniwill_device_features_t *uniwill_get_device_features(void)
|
|||
// Device check for two configurable TDPs
|
||||
uw_feats->uniwill_tdp_config_two = false
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0)
|
||||
|| dmi_string_in(DMI_PRODUCT_SERIAL, "PH4TUX")
|
||||
|| dmi_string_in(DMI_PRODUCT_SERIAL, "PH4TRX")
|
||||
|| uw_feats->model == 0x13
|
||||
|| uw_feats->model == 0x12
|
||||
|| dmi_string_in(DMI_PRODUCT_SERIAL, "PH4TQX")
|
||||
#endif
|
||||
;
|
||||
|
|
Loading…
Reference in a new issue