From ad8d42454ee0bfd2ab82ac1b678911f225b7a155 Mon Sep 17 00:00:00 2001 From: Christoffer Sandberg Date: Mon, 8 Nov 2021 20:26:15 +0100 Subject: [PATCH] Add PH4TQX --- src/tuxedo_io/tuxedo_io.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/tuxedo_io/tuxedo_io.c b/src/tuxedo_io/tuxedo_io.c index 9153e95..56e5cda 100644 --- a/src/tuxedo_io/tuxedo_io.c +++ b/src/tuxedo_io/tuxedo_io.c @@ -109,6 +109,7 @@ static u32 uniwill_identify(void) #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0) || dmi_string_in(DMI_PRODUCT_SERIAL, "PH4TUX") || dmi_string_in(DMI_PRODUCT_SERIAL, "PH4TRX") + || dmi_string_in(DMI_PRODUCT_SERIAL, "PH4TQX") #endif ; @@ -269,11 +270,15 @@ static u32 uw_set_fan_auto(void) /* * TDP boundary definitions per device */ -static int tdp_min_ph4tux[] = { 0x00, 0x00, 0x00 }; +static int tdp_min_ph4tux[] = { 0x07, 0x07, 0x00 }; static int tdp_max_ph4tux[] = { 0x26, 0x26, 0x00 }; -static int tdp_min_ph4trx[] = { 0x00, 0x00, 0x00 }; + +static int tdp_min_ph4trx[] = { 0x07, 0x07, 0x00 }; static int tdp_max_ph4trx[] = { 0x32, 0x32, 0x00 }; +static int tdp_min_ph4tqx[] = { 0x07, 0x07, 0x00 }; +static int tdp_max_ph4tqx[] = { 0x32, 0x32, 0x00 }; + static int uw_get_tdp_min(u8 tdp_index) { int tdp_min = 0; @@ -284,6 +289,8 @@ static int uw_get_tdp_min(u8 tdp_index) tdp_min = tdp_min_ph4tux[tdp_index]; } else if (dmi_string_in(DMI_PRODUCT_SERIAL, "PH4TRX")) { tdp_min = tdp_min_ph4trx[tdp_index]; + } else if (dmi_string_in(DMI_PRODUCT_SERIAL, "PH4TQX")) { + tdp_min = tdp_min_ph4tqx[tdp_index]; } return tdp_min; @@ -299,6 +306,8 @@ static int uw_get_tdp_max(u8 tdp_index) tdp_max = tdp_max_ph4tux[tdp_index]; } else if (dmi_string_in(DMI_PRODUCT_SERIAL, "PH4TRX")) { tdp_max = tdp_max_ph4trx[tdp_index]; + } else if (dmi_string_in(DMI_PRODUCT_SERIAL, "PH4TQX")) { + tdp_max = tdp_max_ph4tqx[tdp_index]; } return tdp_max;